-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(): edit profile WIP * fix(): avatar fix and refactor file structure * fix(): ref types, file paths * fix(): file paths * refactor(): split profile card editable fields into multiple controlled components * fix(): theme type, hide edit buttons when missing data, replace px with em * fix(): replace rest of px with em
- Loading branch information
Showing
104 changed files
with
1,785 additions
and
1,056 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
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
2 changes: 1 addition & 1 deletion
2
...conButton/styled-profile-avatar-button.ts → ...r-buttons/styled-profile-avatar-button.ts
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
16 changes: 16 additions & 0 deletions
16
ui/design/src/components/Buttons/default-buttons/button.tsx
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,16 @@ | ||
import * as React from 'react'; | ||
import StyledButton from './styled-button'; | ||
|
||
export interface IButtonProps { | ||
className?: string; | ||
label: string; | ||
onClick?: () => void; | ||
primary?: boolean; | ||
secondary?: boolean; | ||
} | ||
|
||
const Button = (props: IButtonProps) => { | ||
return <StyledButton className={props.className} {...props} />; | ||
}; | ||
|
||
export default Button; |
20 changes: 20 additions & 0 deletions
20
ui/design/src/components/Buttons/default-buttons/plain-button.tsx
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,20 @@ | ||
import * as React from 'react'; | ||
import { StyledPlainButton, StyledText } from './styled-plain-button'; | ||
|
||
export interface IPlainButtonProps { | ||
className?: string; | ||
onClick?: React.EventHandler<React.SyntheticEvent>; | ||
label: string | number; | ||
children: React.ReactNode; | ||
} | ||
|
||
const PlainButton = (props: IPlainButtonProps) => { | ||
return ( | ||
<StyledPlainButton className={props.className} gap="xsmall" direction="row" align="center"> | ||
{props.children} | ||
<StyledText onClick={props.onClick}>{props.label}</StyledText> | ||
</StyledPlainButton> | ||
); | ||
}; | ||
|
||
export default PlainButton; |
21 changes: 21 additions & 0 deletions
21
ui/design/src/components/Buttons/default-buttons/styled-button.ts
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,21 @@ | ||
import { Button } from 'grommet'; | ||
import styled, { css } from 'styled-components'; | ||
|
||
const StyledButton = styled(Button)` | ||
height: 2em; | ||
border-radius: ${props => props.theme.shapes.smallBorderRadius}; | ||
color: ${props => props.theme.colors.accent}; | ||
&:hover { | ||
box-shadow: none; | ||
} | ||
${props => { | ||
if (props.primary) { | ||
return css` | ||
color: ${props.theme.colors.white}; | ||
`; | ||
} | ||
return; | ||
}} | ||
`; | ||
|
||
export default StyledButton; |
24 changes: 24 additions & 0 deletions
24
ui/design/src/components/Buttons/default-buttons/styled-plain-button.ts
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,24 @@ | ||
import { Box, Text } from 'grommet'; | ||
import styled from 'styled-components'; | ||
|
||
const StyledPlainButton = styled(Box)` | ||
padding: 0 0.8em; | ||
color: ${props => props.theme.colors.secondaryText}; | ||
svg { | ||
height: 100%; | ||
width: 1.25em; | ||
stroke: ${props => props.theme.colors.lightGrey}; | ||
& * { | ||
stroke: ${props => props.theme.colors.secondaryText}; | ||
} | ||
} | ||
`; | ||
|
||
const StyledText = styled(Text)` | ||
cursor: pointer; | ||
&:hover { | ||
color: ${props => props.theme.colors.accent}; | ||
} | ||
`; | ||
|
||
export { StyledPlainButton, StyledText }; |
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
8 changes: 4 additions & 4 deletions
8
...n/src/components/IconButton/icon-link.tsx → ...onents/Buttons/icon-buttons/icon-link.tsx
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
8 changes: 2 additions & 6 deletions
8
...omponents/IconButton/styled-icon-link.tsx → ...Buttons/icon-buttons/styled-icon-link.tsx
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.