Skip to content

Commit

Permalink
Share files from browser support (#1736)
Browse files Browse the repository at this point in the history
* redesign

* copy buttons

* lingui extract

* dynamic dropdown

* copy working

* remove label

* styling suggestions

* lingui extract

* landing modal alignments

* lingui extract

* modal config

* lingui extract

* manage shared folder code refactor

* lingui extract

* modals progress working

* added posthog event

* lingui extract

* changing widths

* added width  breaks

* removed extra styled

* compile translations

* added status checks

* close instead of cancel

Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
  • Loading branch information
5 people authored Nov 18, 2021
1 parent 9c52fbe commit ef5e677
Show file tree
Hide file tree
Showing 18 changed files with 710 additions and 282 deletions.
16 changes: 15 additions & 1 deletion packages/common-components/src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ const useStyles = makeStyles(
},
...overrides?.Button?.variants?.secondary?.root
},
text: {
backgroundColor: "transparent",
color: palette.additional["gray"][9],
"&:hover": {
...overrides?.Button?.variants?.text?.hover
},
"&:focus": {
...overrides?.Button?.variants?.text?.focus
},
"&:active": {
...overrides?.Button?.variants?.text?.active
},
...overrides?.Button?.variants?.text?.root
},
tertiary: {
backgroundColor: palette.additional["gray"][3],
color: palette.common.black.main,
Expand Down Expand Up @@ -293,7 +307,7 @@ interface IButtonProps extends Omit<ReactButton, "size"> {
className?: string
children?: ReactNode | ReactNode[]
fullsize?: boolean
variant?: "link" | "primary" | "secondary" |"tertiary" | "outline" | "dashed" | "danger"
variant?: "link" | "primary" | "secondary" |"tertiary" | "outline" | "dashed" | "danger" | "text"
iconButton?: boolean
size?: "large" | "medium" | "small"
type?: "button" | "submit" | "reset"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const useStyles = makeStyles(
root: {
cursor: "pointer",
display: "flex",
alignItems: "center",
...overrides?.CheckboxInput?.root
},
checkbox: {
Expand Down
1 change: 1 addition & 0 deletions packages/common-components/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const useStyles = makeStyles(
margin: "auto",
maxHeight: "100%",
overflow: "auto",
alignItems: "center",
"&.xs": {
width: `calc(100% - ${constants.generalUnit * 2}px)`,
maxWidth: breakpoints.width("xs"),
Expand Down
1 change: 0 additions & 1 deletion packages/common-components/src/SelectInput/SelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const useStyles = makeStyles(
({ animation, constants, palette, overrides }: ITheme) =>
createStyles({
root: {
margin: 5,
display: "block",
...overrides?.SelectInput?.root
},
Expand Down
4 changes: 3 additions & 1 deletion packages/common-components/src/stories/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ export const actionsData = {
onClick: action("onClickButton")
}

type VariantOption = "primary" | "secondary" | "tertiary" | "outline" | "dashed" | "danger" | undefined;
type VariantOption = "primary" | "secondary" | "tertiary" | "link" | "text" | "outline" | "dashed" | "danger" | undefined;
const variantOptions: VariantOption[] = [
"primary",
"outline",
"dashed",
"danger",
"link",
"text",
undefined
]

Expand Down
12 changes: 12 additions & 0 deletions packages/common-theme/src/Overrides/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ export interface IButtonOverride {
focus?: Record<string, any>
active?: Record<string, any>
}
link?: {
root?: Record<string, any>
hover?: Record<string, any>
focus?: Record<string, any>
active?: Record<string, any>
}
text?: {
root?: Record<string, any>
hover?: Record<string, any>
focus?: Record<string, any>
active?: Record<string, any>
}
}
state?: {
danger?: {
Expand Down
6 changes: 4 additions & 2 deletions packages/files-ui/src/Components/Elements/CustomModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const useStyles = makeStyles(({ constants, breakpoints }: CSFTheme) =>
},
inner: {
backgroundColor: constants.modalDefault.backgroundColor,
color: constants.modalDefault.color
color: constants.modalDefault.color,
width: "100%"
},
mobileStickyBottom: {
[breakpoints.down("md")]: {
Expand Down Expand Up @@ -51,7 +52,8 @@ const CustomModal = ({ className, children, injectedClass, mobileStickyBottom =
className={clsx(classes.root, className)}
injectedClass={{
closeIcon: clsx(classes.closeIcon, injectedClass?.closeIcon),
inner: clsx(classes.inner, mobileStickyBottom ? classes.mobileStickyBottom : undefined, injectedClass?.inner)
inner: clsx(classes.inner, mobileStickyBottom ? classes.mobileStickyBottom : undefined, injectedClass?.inner),
subModalInner: injectedClass?.subModalInner
}}
{...rest}
>
Expand Down
Loading

0 comments on commit ef5e677

Please sign in to comment.