-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
298 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { useCallback } from 'react' | ||
|
||
import { Icon } from '../common.js' | ||
|
||
import type { FC, KeyboardEvent } from 'react' | ||
import type { IconProps } from '../common.js' | ||
|
||
const SignIn: FC<IconProps> = ({ | ||
onClick, | ||
className, | ||
cursor, | ||
size = 'medium', | ||
color = 'black', | ||
tabIndex = 0 | ||
}) => { | ||
const handleOnClick = useCallback(() => { | ||
if (typeof onClick === 'function') { | ||
onClick() | ||
} | ||
}, [onClick]) | ||
const onKeyDown = useCallback( | ||
(evt: KeyboardEvent) => { | ||
if (evt.code === 'Enter') { | ||
handleOnClick() | ||
} | ||
}, | ||
[handleOnClick] | ||
) | ||
|
||
return ( | ||
<Icon | ||
color={color} | ||
cursor={cursor} | ||
size={size} | ||
className={className} | ||
tabIndex={tabIndex} | ||
onClick={handleOnClick} | ||
onKeyDown={onKeyDown}> | ||
<svg viewBox="0 0 512 512"> | ||
<path d="M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z" /> | ||
</svg> | ||
</Icon> | ||
) | ||
} | ||
|
||
export { SignIn } | ||
export type { IconProps } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { SignIn } from './mod.js' | ||
|
||
import type { StoryFn } from '@storybook/react' | ||
|
||
const Primary: StoryFn<typeof SignIn> = args => { | ||
return <SignIn {...args} /> | ||
} | ||
|
||
export default { | ||
title: 'Icons/SignIn', | ||
component: SignIn, | ||
args: { | ||
outlined: false, | ||
size: 'medium', | ||
color: '#c1c1c1', | ||
tabIndex: 0 | ||
}, | ||
argTypes: { | ||
size: { | ||
control: 'select', | ||
options: ['small', 'medium', 'large'] | ||
}, | ||
color: { | ||
control: 'color' | ||
}, | ||
onClick: { | ||
action: 'onClick' | ||
} | ||
} | ||
} | ||
export { Primary } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { useCallback } from 'react' | ||
|
||
import { Icon } from '../common.js' | ||
|
||
import type { FC, KeyboardEvent } from 'react' | ||
import type { IconProps } from '../common.js' | ||
|
||
const SignOut: FC<IconProps> = ({ | ||
onClick, | ||
className, | ||
cursor, | ||
size = 'medium', | ||
color = 'black', | ||
tabIndex = 0 | ||
}) => { | ||
const handleOnClick = useCallback(() => { | ||
if (typeof onClick === 'function') { | ||
onClick() | ||
} | ||
}, [onClick]) | ||
const onKeyDown = useCallback( | ||
(evt: KeyboardEvent) => { | ||
if (evt.code === 'Enter') { | ||
handleOnClick() | ||
} | ||
}, | ||
[handleOnClick] | ||
) | ||
|
||
return ( | ||
<Icon | ||
color={color} | ||
cursor={cursor} | ||
size={size} | ||
className={className} | ||
tabIndex={tabIndex} | ||
onClick={handleOnClick} | ||
onKeyDown={onKeyDown}> | ||
<svg viewBox="0 0 512 512"> | ||
<path d="M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z" /> | ||
</svg> | ||
</Icon> | ||
) | ||
} | ||
|
||
export { SignOut } | ||
export type { IconProps } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { SignOut } from './mod.js' | ||
|
||
import type { StoryFn } from '@storybook/react' | ||
|
||
const Primary: StoryFn<typeof SignOut> = args => { | ||
return <SignOut {...args} /> | ||
} | ||
|
||
export default { | ||
title: 'Icons/SignOut', | ||
component: SignOut, | ||
args: { | ||
outlined: false, | ||
size: 'medium', | ||
color: '#c1c1c1', | ||
tabIndex: 0 | ||
}, | ||
argTypes: { | ||
size: { | ||
control: 'select', | ||
options: ['small', 'medium', 'large'] | ||
}, | ||
color: { | ||
control: 'color' | ||
}, | ||
onClick: { | ||
action: 'onClick' | ||
} | ||
} | ||
} | ||
export { Primary } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { FC } from 'react' | ||
|
||
const AuthnCallback: FC = () => { | ||
return null | ||
} | ||
|
||
export { AuthnCallback } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.