Add i18n, use default imports for UI.

This commit is contained in:
Paul
2021-06-18 15:18:10 +01:00
parent 9ac2316ed0
commit 58821476e6
17 changed files with 90 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
import styled from "styled-components";
export const Banner = styled.div`
export default styled.div`
padding: 8px;
font-size: 14px;
text-align: center;

View File

@@ -5,7 +5,7 @@ interface Props {
readonly error?: boolean;
};
export const Button = styled.button<Props>`
export default styled.button<Props>`
z-index: 1;
padding: 8px;
font-size: 16px;

View File

@@ -67,7 +67,7 @@ interface Props {
onChange: (state: boolean) => void;
}
export function Checkbox(props: Props) {
export default function Checkbox(props: Props) {
return (
<CheckboxBase disabled={props.disabled}>
<CheckboxContent>

View File

@@ -86,7 +86,7 @@ const Rows = styled.div`
}
`;
export function ColourSwatches({ value, onChange }: Props) {
export default function ColourSwatches({ value, onChange }: Props) {
const ref = useRef<HTMLInputElement>();
return (

View File

@@ -1,6 +1,6 @@
import styled from "styled-components";
export const ComboBox = styled.select`
export default styled.select`
padding: 8px;
border-radius: 2px;
color: var(--secondary-foreground);

View File

@@ -4,7 +4,7 @@ interface Props {
readonly contrast?: boolean;
};
export const InputBox = styled.input<Props>`
export default styled.input<Props>`
z-index: 1;
padding: 8px 16px;
border-radius: 6px;

View File

@@ -1,6 +1,6 @@
import styled from 'styled-components';
export const LineDivider = styled.div`
export default styled.div`
height: 0px;
opacity: 0.6;
flex-shrink: 0;

View File

@@ -32,7 +32,7 @@ const OverlineBase = styled.div<Omit<Props, 'children' | 'error'>>`
${ props => props.block && css`display: block;` }
`;
export function Overline(props: Props) {
export default function Overline(props: Props) {
return (
<OverlineBase {...props}>
{ props.children }

View File

@@ -1,3 +1,3 @@
export function Preloader() {
export default function Preloader() {
return <span>LOADING</span>
}

View File

@@ -81,7 +81,7 @@ const RadioDescription = styled.span<BaseProps>`
` }
`;
export function Radio(props: Props) {
export default function Radio(props: Props) {
return (
<RadioBase
selected={props.checked}

View File

@@ -26,7 +26,7 @@ export const TipBase = styled.div`
}
`;
export function Tip(props: { children: Children }) {
export default function Tip(props: { children: Children }) {
return (
<TipBase>
<Info size={20} strokeWidth={2} />