@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.
@@ -0,0 +1,4 @@
1
+ export interface NavProps {
2
+ active?: boolean;
3
+ }
4
+ export declare const Nav: import("styled-components").StyledComponent<"nav", any, NavProps, never>;
@@ -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
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://npm.pkg.github.com/integrigo"
5
5
  },
6
- "version": "1.1.4",
6
+ "version": "1.1.5",
7
7
  "main": "lib/index.js",
8
8
  "module": "lib/index.esm.js",
9
9
  "types": "lib/index.d.ts",
@@ -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'