@integrigo/integrigo-ui 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/atoms/Nav/Nav.d.ts +4 -0
- package/lib/components/atoms/Nav/Nav.stories.d.ts +5 -0
- package/lib/components/atoms/Nav/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/atoms/Nav/Nav.stories.tsx +19 -0
- package/src/components/atoms/Nav/Nav.tsx +20 -0
- package/src/components/atoms/Nav/index.ts +1 -0
@@ -0,0 +1,5 @@
|
|
1
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
2
|
+
declare const _default: ComponentMeta<import("styled-components").StyledComponent<"nav", any, import("./Nav").NavProps, never>>;
|
3
|
+
export default _default;
|
4
|
+
export declare const Basic: ComponentStory<import("styled-components").StyledComponent<"nav", any, import("./Nav").NavProps, never>>;
|
5
|
+
export declare const Active: ComponentStory<import("styled-components").StyledComponent<"nav", any, import("./Nav").NavProps, never>>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Nav } from './Nav';
|
package/package.json
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
3
|
+
|
4
|
+
import { Nav } from './Nav';
|
5
|
+
|
6
|
+
export default {
|
7
|
+
title: 'Atoms/Nav',
|
8
|
+
component: Nav,
|
9
|
+
} as ComponentMeta<typeof Nav>;
|
10
|
+
|
11
|
+
const Template: ComponentStory<typeof Nav> = (args) => <Nav {...args}>The Nav text</Nav>;
|
12
|
+
|
13
|
+
export const Basic = Template.bind({});
|
14
|
+
Basic.args = {};
|
15
|
+
|
16
|
+
export const Active = Template.bind({});
|
17
|
+
Active.args = {
|
18
|
+
active: true
|
19
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import styled from "styled-components";
|
2
|
+
|
3
|
+
export interface NavProps {
|
4
|
+
active?: boolean;
|
5
|
+
}
|
6
|
+
|
7
|
+
export const Nav = styled.nav<NavProps>`
|
8
|
+
font-size: var(--font-size-l);
|
9
|
+
font-weight: ${p => p.active ? 'var(--font-bold)' : 'var(--font-medium)'};
|
10
|
+
cursor: pointer;
|
11
|
+
white-space: nowrap;
|
12
|
+
width: min-content;
|
13
|
+
transition: color var(--transition-speed);
|
14
|
+
|
15
|
+
&:hover {
|
16
|
+
color: ${p => p.active ? 'auto' : 'var(--color-green)' };
|
17
|
+
}
|
18
|
+
`
|
19
|
+
|
20
|
+
Nav.displayName = 'Nav'
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Nav } from './Nav'
|