mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Add i18n, use default imports for UI.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export function Preloader() {
|
||||
export default function Preloader() {
|
||||
return <span>LOADING</span>
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user