diff --git a/docs/Alarm.mdx b/docs/Alarm.mdx new file mode 100644 index 0000000..3a1aa11 --- /dev/null +++ b/docs/Alarm.mdx @@ -0,0 +1,28 @@ +## Title + +Alarm + +## Description + +An interactive indicator that visually represents alarm status and allows users to toggle alarm activation through user interaction. + +## Anatomy + +- **`isAlarmExisted`** : Boolean flag to indicate whether an alarm is currently set. +- **`isActivated`** : Boolean flag to indicate whether the alarm is active and alerting. +- **`onClick`** : Function to handle click events on the alarm, typically used to toggle the alarm state. +- **`alarmRef`** (optional): React ref object attached to the button element for direct DOM manipulation or access. + +## Usage + +```tsx +import { Alarm } from 'ggf-ui'; +``` + +```tsx + +``` + +## Storybook + +[https://661f5982ddc662c8c9a12d6b-fqsleqszgq.chromatic.com/?path=/story/alarm-alarm--example&globals=backgrounds.value:!hex(333333)]() diff --git a/docs/AlarmCard.mdx b/docs/AlarmCard.mdx new file mode 100644 index 0000000..19bfb27 --- /dev/null +++ b/docs/AlarmCard.mdx @@ -0,0 +1,28 @@ +## Title + +AlarmCard + +## Description + +A component that displays an alarm's details and provides an interactive delete button with hover effects. + +## Anatomy + +- **`id`** : A unique identifier for the alarm card, used to handle specific actions. +- **`content`** : Text content displayed on the card, representing the alarm's description or details. +- **`createdAt`** : String indicating the alarm's creation time, displayed at the card's bottom. +- **`onClick`** : Function triggered when the delete button is clicked, taking the alarm's **`id`** as an argument to identify which alarm to delete. + +## Usage + +```tsx +import { AlarmCard } from 'ggf-ui'; +``` + +```tsx + +``` + +## Storybook + +[https://661f5982ddc662c8c9a12d6b-fqsleqszgq.chromatic.com/?path=/story/cards-alarmcard--example&globals=backgrounds.value:!hex(333333)]() diff --git a/docs/AlarmList.mdx b/docs/AlarmList.mdx new file mode 100644 index 0000000..0151a76 --- /dev/null +++ b/docs/AlarmList.mdx @@ -0,0 +1,46 @@ +## Title + +AlarmList + +## Description + +A component for displaying a list of alarm notifications, including options to delete individual alarms or all alarms. + +## Anatomy + +- **`alarmText`**: Text indicating the purpose or category of the alarms. +- **`deleteAllText`**: Text displayed on the button to delete all alarms. +- **`notifications`**: Array of objects representing individual alarm notifications, each containing: + - **`id`**: Unique identifier for the alarm. + - **`content`**: Description or details of the alarm. + - **`createdAt`**: Time stamp of when the alarm was created. +- **`totalCount`**: Total count of alarms in the list. +- **`handleDelete`**: Function triggered when an alarm is deleted, taking the alarm's ID as an argument. +- **`handleDeleteAll`**: Function triggered when the button to delete all alarms is clicked. +- **`emptyAlarmText`**: Text displayed when there are no alarms to show. +- **`alarmListRef`** (optional): React ref object attached to the **`
`** element wrapping the alarm list. + +## Usage + +```tsx +import { AlarmList } from 'ggf-ui'; +``` + +```tsx + +``` + +## Storybook + +[https://661f5982ddc662c8c9a12d6b-fqsleqszgq.chromatic.com/?path=/story/alarmlist-alarmlist--example&globals=backgrounds.value:!hex(333333)]() diff --git a/docs/Avatar.mdx b/docs/Avatar.mdx new file mode 100644 index 0000000..8422cd8 --- /dev/null +++ b/docs/Avatar.mdx @@ -0,0 +1,27 @@ +## Title + +Avatar + +## Description + +A component for displaying user avatars with optional activation. + +## Anatomy + +- **`profileImageUrl`**: URL of the user's profile image. +- **`size`** (optional): Sets the size of the avatar. Can be `'small' | 'medium' | 'large'` Defaults to 'medium'. +- **`isActivated`** (optional): Boolean indicating whether the avatar is activated. + +## Usage + +```tsx +import { Avatar } from 'ggf-ui'; +``` + +```tsx + +``` + +## Storybook + +[https://661f5982ddc662c8c9a12d6b-fqsleqszgq.chromatic.com/?path=/story/avatar-avatar--example&globals=backgrounds.value:!hex(333333)]() diff --git a/docs/DrawerMenu.mdx b/docs/DrawerMenu.mdx new file mode 100644 index 0000000..778e024 --- /dev/null +++ b/docs/DrawerMenu.mdx @@ -0,0 +1,35 @@ +## Title + +DrawerMenu + +## Description + +A component for displaying a drawer menu with a list of menu items and a close button. + +## Anatomy + +- **`menuList`**: An array of objects representing menu items, each containing: + - **`menu`**: Text representing the menu item. + - **`path`**: URL path associated with the menu item. +- **`onClick`**: Function triggered when a menu item or the close button is clicked. + +## Usage + +```tsx +import { DrawerMenu } from 'ggf-ui'; +``` + +```tsx + +``` + +## Storybook + +[https://661f5982ddc662c8c9a12d6b-fqsleqszgq.chromatic.com/?path=/story/drawermenu-drawermenu--example&globals=backgrounds.value:!hex(333333)]() diff --git a/docs/EmptyAlarmCard.mdx b/docs/EmptyAlarmCard.mdx new file mode 100644 index 0000000..17b0f76 --- /dev/null +++ b/docs/EmptyAlarmCard.mdx @@ -0,0 +1,25 @@ +## Title + +EmptyAlarmCard + +## Description + +A component for displaying an empty state message in the alarm list when there are no alarms. + +## Anatomy + +• **`emptyAlarmText`**: Text message to be displayed when there are no alarms. + +## Usage + +```tsx +import { EmptyAlarmCard } from 'ggf-ui'; +``` + +```tsx + +``` + +## Storybook + +[https://661f5982ddc662c8c9a12d6b-fqsleqszgq.chromatic.com/?path=/story/alarm-alarm--example&globals=backgrounds.value:!hex(333333)]() diff --git a/docs/Header.mdx b/docs/Header.mdx new file mode 100644 index 0000000..ed9cfdd --- /dev/null +++ b/docs/Header.mdx @@ -0,0 +1,46 @@ +## Title + +Header + +## Description + +A header component containing a logo, menu button, and optional children elements. + +## Anatomy + +- **`path`**: URL path associated with the logo link. +- **`logoName`**: Text or image representing the logo. +- **`menuList`**: An array of objects representing menu items, each containing: + - **`menu`**: Text representing the menu item. + - **`path`**: URL path associated with the menu item. +- **`activatedMenu`**: Index of the currently activated menu item. +- **`handleActivatedMenu`**: Function triggered when a menu item is activated. +- **`handleOpenDrawerMenu`**: Function triggered when the drawer menu button is clicked. +- **`children`** (optional): React elements to be displayed in the header. + +## Usage + +```tsx +import { Header } from 'ggf-ui'; +``` + +```tsx +
+ {/* Optional children elements */} +
+``` + +## Storybook + +[https://661f5982ddc662c8c9a12d6b-fqsleqszgq.chromatic.com/?path=/story/header-header--example&globals=backgrounds.value:!hex(333333)]() diff --git a/docs/HeaderProfile.mdx b/docs/HeaderProfile.mdx new file mode 100644 index 0000000..022aa24 --- /dev/null +++ b/docs/HeaderProfile.mdx @@ -0,0 +1,29 @@ +## Title + +HeaderProfile + +## Description + +A component representing the user profile section in the header, including the user's nickname and profile image. + +## Anatomy + +- **`nickname`**: The user's nickname to be displayed. +- **`profileImageUrl`**: URL of the user's profile image. +- **`isActivated`**: Boolean indicating whether the profile section is activated. +- **`onClick`**: Function triggered when the profile section is clicked. +- **`headerProfileRef`** (optional): React ref object attached to the **`