Aller au contenu principal

Styled Dialog Components

Description

The Dialog components provide structured elements for building modal dialogs with proper styling, responsiveness, and accessibility.

Props

PropTypeDefaultDescription
variant"primary", "secondary""primary"Defines the typography variant for the title.
fontSizestring, number18pxDefines the font size of the title.
fontWeightstring, numberboldSets the font weight of the title.
backgroundstringtheme.background.defaultBackground color of the dialog content or actions.
paddingstring, numbertheme.spacing(2)Defines padding for dialog components.
borderTopstringtheme.palette.dividerAdds a separator on top of the actions container.
overflowYstringautoEnables vertical scrolling for long content.

Example Usage

Basic Dialog Title

import { Dialog_Title } from '@nomana-it/liberty-core';

export const DialogTitleExample = () => {
return (
<Dialog_Title>
Dialog Header
</Dialog_Title>
);
};

Predefined Styled Dialog Components

Liberty Core provides a collection of predefined styled Dialog components to simplify modal UI development.

General Styled Dialog Components

  • Dialog_Title
  • Dialog_Content
  • Dialog_Actions

Detailed Predefined Components

Dialog_Title

A styled typography component for dialog headers.

import { Dialog_Title } from '@nomana-it/liberty-core';

<Dialog_Title>
Dialog Header
</Dialog_Title>

Dialog_Content

A scrollable container for dialog content.

import { Dialog_Content } from '@nomana-it/liberty-core';

<Dialog_Content>
This is the content inside a dialog.
</Dialog_Content>

Dialog_Actions

A flex container for dialog action buttons.

import { Dialog_Actions } from '@nomana-it/liberty-core';
import { Button } from '@nomana-it/liberty-core';

<Dialog_Actions>
<Button variant="outlined">Cancel</Button>
<Button variant="contained">Confirm</Button>
</Dialog_Actions>

🔗 GitHub Repository (Core): Liberty Core
🔗 GitHub Repository (Test Project): Liberty Test
📖 Live Documentation: Liberty Core Docs
💖 Sponsor & Support: Sponsor Liberty Core