mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-24 06:34:18 +01:00
feat: reset button
This commit is contained in:
1 parent
34c2cfdb2a
commit
9f77936e3e
1 file changed
+19
-13
@@ -5,19 +5,11 @@ import {
|
|||||||
HeightIcon,
|
HeightIcon,
|
||||||
ImageIcon,
|
ImageIcon,
|
||||||
Link2Icon,
|
Link2Icon,
|
||||||
|
ResetIcon,
|
||||||
TimerIcon,
|
TimerIcon,
|
||||||
WidthIcon,
|
WidthIcon,
|
||||||
} from '@radix-ui/react-icons';
|
} from '@radix-ui/react-icons';
|
||||||
import {
|
import { Box, Button, Flex, Heading, ScrollArea, Text } from '@radix-ui/themes';
|
||||||
AlertDialog,
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Flex,
|
|
||||||
Heading,
|
|
||||||
ScrollArea,
|
|
||||||
Text,
|
|
||||||
TextField,
|
|
||||||
} from '@radix-ui/themes';
|
|
||||||
import { capitalize, startCase } from 'lodash';
|
import { capitalize, startCase } from 'lodash';
|
||||||
import { ReactNode, useEffect, useRef, useState } from 'react';
|
import { ReactNode, useEffect, useRef, useState } from 'react';
|
||||||
import { CopyButton } from '../../../../../components/CopyButton';
|
import { CopyButton } from '../../../../../components/CopyButton';
|
||||||
@@ -32,6 +24,7 @@ import { configurations } from '../../configurations';
|
|||||||
import { Boolean } from './components/Boolean';
|
import { Boolean } from './components/Boolean';
|
||||||
import { Color } from './components/Color';
|
import { Color } from './components/Color';
|
||||||
import { Enum } from './components/Enum';
|
import { Enum } from './components/Enum';
|
||||||
|
import { Import } from './components/Import';
|
||||||
import { PreviewWrapper } from './components/PreviewWrapper';
|
import { PreviewWrapper } from './components/PreviewWrapper';
|
||||||
import { Radius } from './components/Radius';
|
import { Radius } from './components/Radius';
|
||||||
import { RichText } from './components/RichText';
|
import { RichText } from './components/RichText';
|
||||||
@@ -39,7 +32,6 @@ import { Size } from './components/Size';
|
|||||||
import { SizeWithout0 } from './components/SizeWithout0';
|
import { SizeWithout0 } from './components/SizeWithout0';
|
||||||
import { Slider } from './components/Slider';
|
import { Slider } from './components/Slider';
|
||||||
import { Text as TextController } from './components/Text';
|
import { Text as TextController } from './components/Text';
|
||||||
import { Import } from './components/Import';
|
|
||||||
|
|
||||||
export interface EmbedPreviewControllerProps {
|
export interface EmbedPreviewControllerProps {
|
||||||
configKey: string;
|
configKey: string;
|
||||||
@@ -76,7 +68,7 @@ export default function Page({
|
|||||||
style={{ height: '100%', maxWidth: 320 }}
|
style={{ height: '100%', maxWidth: 320 }}
|
||||||
>
|
>
|
||||||
<Flex direction="column" gap="2" p="4">
|
<Flex direction="column" gap="2" p="4">
|
||||||
<Import/>
|
<Import />
|
||||||
|
|
||||||
<Heading>Export</Heading>
|
<Heading>Export</Heading>
|
||||||
<Text size="2" color="gray" mb="2">
|
<Text size="2" color="gray" mb="2">
|
||||||
@@ -140,7 +132,21 @@ export default function Page({
|
|||||||
</CopyButton>
|
</CopyButton>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Heading>Customize</Heading>
|
<Flex justify="between" align="center">
|
||||||
|
<Heading>Customize</Heading>
|
||||||
|
<Button
|
||||||
|
color="red"
|
||||||
|
variant="ghost"
|
||||||
|
onClick={() => {
|
||||||
|
embedStateStore.setState(
|
||||||
|
embedStateStore.getInitialState(),
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ResetIcon /> Reset
|
||||||
|
</Button>
|
||||||
|
</Flex>
|
||||||
<Text size="2" color="gray" mb="2">
|
<Text size="2" color="gray" mb="2">
|
||||||
Bells and whistles of your embed
|
Bells and whistles of your embed
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
Reference in new issue
Block a user