diff --git a/configs/rollup.config.js b/configs/rollup.config.js index f2b6bec8..8d54f722 100644 --- a/configs/rollup.config.js +++ b/configs/rollup.config.js @@ -29,7 +29,8 @@ const TSComponentsList = [ 'Image', 'Rating', 'InteractiveWidget', - 'GeneUIProvider' + 'GeneUIProvider', + 'Header' ]; const getInputs = (name, dir) => { diff --git a/src/index.ts b/src/index.ts index fa0afdcb..83e1dfcf 100755 --- a/src/index.ts +++ b/src/index.ts @@ -144,6 +144,7 @@ export { default as TransferList } from './lib/organisms/TransferList'; export { default as RichEditor } from './lib/organisms/RichEditor'; export { default as Drawer } from './lib/organisms/Drawer'; export { default as ActionableList } from './lib/organisms/ActionableList'; +export { default as Header } from './lib/organisms/Header'; // Providers export { default as GeneUIProvider, GeneUIDesignSystemContext } from './lib/providers/GeneUIProvider'; diff --git a/src/lib/organisms/Header/Header.scss b/src/lib/organisms/Header/Header.scss new file mode 100644 index 00000000..f126747c --- /dev/null +++ b/src/lib/organisms/Header/Header.scss @@ -0,0 +1,5 @@ +.header { + // Your styles here + color: var(--guit-ref-color-magenta-500base); + font-size: var(--guit-sem-font-caption-large-medium-font-size); +} diff --git a/src/lib/organisms/Header/Header.stories.tsx b/src/lib/organisms/Header/Header.stories.tsx new file mode 100644 index 00000000..d7b1e2af --- /dev/null +++ b/src/lib/organisms/Header/Header.stories.tsx @@ -0,0 +1,27 @@ +import React, { FC } from 'react'; +import { Meta } from '@storybook/react'; + +// Helpers +import { args, propCategory } from '../../../../stories/assets/storybook.globals'; + +// Components +import Header, { IHeaderProps } from './index'; + +const meta: Meta = { + title: 'Organisms/Header', + component: Header, + argTypes: { + type: args({ control: false, ...propCategory.others }) + }, + args: { + type: 'fill the type prop value' + } as IHeaderProps +}; + +export default meta; + +const Template: FC = (args) =>
; + +export const Default = Template.bind({}); + +Default.args = {} as IHeaderProps; diff --git a/src/lib/organisms/Header/Header.test.tsx b/src/lib/organisms/Header/Header.test.tsx new file mode 100644 index 00000000..fc81f20d --- /dev/null +++ b/src/lib/organisms/Header/Header.test.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { ReactWrapper, mount } from 'enzyme'; + +// Components +import Header, { IHeaderProps } from './index'; + +describe('Header ', () => { + let setup: ReactWrapper; + beforeEach(() => (setup = mount(
))); + + it('renders without crashing', () => { + expect(setup.exists()).toBeTruthy(); + }); + + // Your tests here +}); diff --git a/src/lib/organisms/Header/Header.tsx b/src/lib/organisms/Header/Header.tsx new file mode 100644 index 00000000..190ad07c --- /dev/null +++ b/src/lib/organisms/Header/Header.tsx @@ -0,0 +1,20 @@ +import React, { FC } from 'react'; + +// Styles +import './Header.scss'; + +interface IHeaderProps { + /** + * type description + */ + type?: unknown; +} + +/** + * Global Header component is a persistent navigation element that appears at the top of an application or website. It serves as a central hub for accessing key features and tools, ensuring consistent and intuitive navigation across all pages. + */ +const Header: FC = ({ type }) => { + return
Header component
; +}; + +export { IHeaderProps, Header as default }; diff --git a/src/lib/organisms/Header/index.tsx b/src/lib/organisms/Header/index.tsx new file mode 100644 index 00000000..63341ac8 --- /dev/null +++ b/src/lib/organisms/Header/index.tsx @@ -0,0 +1 @@ +export { IHeaderProps, default as default } from './Header';