Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita68b076

Browse files
authored
refactor: Rename Icons and add stories (#1080)
* Rename CloseIcon* Rename FileCopyIcon, take out of index* Rename LogoutIcon and remove from index* Delete icons index files* Add icon stories* Lint
1 parentb9933d4 commita68b076

20 files changed

+137
-33
lines changed

‎site/src/components/Button/CopyButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { makeStyles } from "@material-ui/core/styles"
33
importTooltipfrom"@material-ui/core/Tooltip"
44
importCheckfrom"@material-ui/icons/Check"
55
importReact,{useState}from"react"
6-
import{FileCopy}from"../Icons"
6+
import{FileCopyIcon}from"../Icons/FileCopyIcon"
77

88
interfaceCopyButtonProps{
99
text:string
@@ -38,7 +38,7 @@ export const CopyButton: React.FC<CopyButtonProps> = ({ className = "", text })
3838
<Tooltiptitle="Copy to Clipboard"placement="top">
3939
<divclassName={`${styles.copyButtonWrapper}${className}`}>
4040
<ButtonclassName={styles.copyButton}onClick={copyToClipboard}size="small">
41-
{isCopied ?<CheckclassName={styles.fileCopyIcon}/> :<FileCopyclassName={styles.fileCopyIcon}/>}
41+
{isCopied ?<CheckclassName={styles.fileCopyIcon}/> :<FileCopyIconclassName={styles.fileCopyIcon}/>}
4242
</Button>
4343
</div>
4444
</Tooltip>

‎site/src/components/Form/FormCloseButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import IconButton from "@material-ui/core/IconButton"
22
import{makeStyles}from"@material-ui/core/styles"
33
importTypographyfrom"@material-ui/core/Typography"
44
importReact,{useEffect}from"react"
5-
import{CloseIcon}from"../Icons/Close"
5+
import{CloseIcon}from"../Icons/CloseIcon"
66

77
exportinterfaceFormCloseButtonProps{
88
onClose:()=>void
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{BuildingIcon}from"./BuildingIcon"
4+
5+
exportdefault{
6+
title:"icons/BuildingIcon",
7+
component:BuildingIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><BuildingIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{CloseIcon}from"./CloseIcon"
4+
5+
exportdefault{
6+
title:"icons/CloseIcon",
7+
component:CloseIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><CloseIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{CoderIcon}from"./CoderIcon"
4+
5+
exportdefault{
6+
title:"icons/CoderIcon",
7+
component:CoderIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><CoderIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{DocsIcon}from"./DocsIcon"
4+
5+
exportdefault{
6+
title:"icons/DocsIcon",
7+
component:DocsIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><DocsIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{ErrorIcon}from"./ErrorIcon"
4+
5+
exportdefault{
6+
title:"icons/ErrorIcon",
7+
component:ErrorIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><ErrorIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{FileCopyIcon}from"./FileCopyIcon"
4+
5+
exportdefault{
6+
title:"icons/FileCopyIcon",
7+
component:FileCopyIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><FileCopyIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}

‎site/src/components/Icons/FileCopy.tsxrenamed to‎site/src/components/Icons/FileCopyIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
importSvgIconfrom"@material-ui/core/SvgIcon"
22
importReactfrom"react"
33

4-
exportconstFileCopy:typeofSvgIcon=(props)=>(
4+
exportconstFileCopyIcon:typeofSvgIcon=(props)=>(
55
<SvgIcon{...props}viewBox="0 0 20 20">
66
<path
77
d="M12.7412 2.2807H4.32014C3.5447 2.2807 2.91663 2.90877 2.91663 3.68421V13.5088H4.32014V3.68421H12.7412V2.2807ZM14.8465 5.08772H7.12716C6.35172 5.08772 5.72365 5.71579 5.72365 6.49123V16.3158C5.72365 17.0912 6.35172 17.7193 7.12716 17.7193H14.8465C15.6219 17.7193 16.25 17.0912 16.25 16.3158V6.49123C16.25 5.71579 15.6219 5.08772 14.8465 5.08772ZM14.8465 16.3158H7.12716V6.49123H14.8465V16.3158Z"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{Logo}from"./Logo"
4+
5+
exportdefault{
6+
title:"icons/Logo",
7+
component:Logo,
8+
}
9+
10+
constTemplate:Story=(args)=><Logofill="black"{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{LogoutIcon}from"./LogoutIcon"
4+
5+
exportdefault{
6+
title:"icons/LogoutIcon",
7+
component:LogoutIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><LogoutIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{UsersOutlinedIcon}from"./UsersOutlinedIcon"
4+
5+
exportdefault{
6+
title:"icons/UsersOutlinedIcon",
7+
component:UsersOutlinedIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><UsersOutlinedIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{WorkspacesIcon}from"./WorkspacesIcon"
4+
5+
exportdefault{
6+
title:"icons/WorkspacesIcon",
7+
component:WorkspacesIcon,
8+
}
9+
10+
constTemplate:Story=(args)=><WorkspacesIcon{...args}/>
11+
12+
exportconstExample=Template.bind({})
13+
Example.args={}

‎site/src/components/Icons/index.test.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎site/src/components/Icons/index.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎site/src/components/Navbar/NavbarView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { NavLink } from "react-router-dom"
66
import{UserResponse}from"../../../api/types"
77
import{navHeight}from"../../../theme/constants"
88
import{AdminDropdown}from"../../AdminDropdown/AdminDropdown"
9-
import{Logo}from"../../Icons"
9+
import{Logo}from"../../Icons/Logo"
1010
import{UserDropdown}from"../UserDropdown"
1111

1212
exportinterfaceNavbarViewProps{

‎site/src/components/Navbar/UserDropdown/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { Link } from "react-router-dom"
1010
import{UserResponse}from"../../../api/types"
1111
import{BorderedMenu}from"../../BorderedMenu/BorderedMenu"
1212
import{CloseDropdown,OpenDropdown}from"../../DropdownArrows/DropdownArrows"
13-
import{LogoutIcon}from"../../Icons"
1413
import{DocsIcon}from"../../Icons/DocsIcon"
14+
import{LogoutIcon}from"../../Icons/LogoutIcon"
1515
import{UserAvatar}from"../../User"
1616
import{UserProfileCard}from"../../User/UserProfileCard"
1717

‎site/src/components/SignIn/Welcome.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import{makeStyles}from"@material-ui/core/styles"
22
importTypographyfrom"@material-ui/core/Typography"
33
importReactfrom"react"
4-
import{CoderIcon}from"../Icons"
4+
import{CoderIcon}from"../Icons/CoderIcon"
55

66
exportconstWelcome:React.FC=()=>{
77
conststyles=useStyles()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp