Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions @docs/assets/logo/taddy_label.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions @docs/assets/logo/taddy_new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 17 additions & 15 deletions @docs/website/components/playground/CompiledCode.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import {css} from 'taddy';
import { css } from 'taddy';

import {useAtom} from '@reatom/react';
import type {PropsWithChildren} from 'react';
import { useAtom } from '@reatom/react';
import type { PropsWithChildren } from 'react';

import {Column, Row} from '../layout';
import {transformAtom} from './atoms';
import {Editor} from './Editor';
import {EditorLayer} from './EditorLayer';
import {ReactRender} from './ReactRender';
import { Column, Row } from '../layout';
import { transformAtom } from './atoms';
import { Editor } from './Editor';
import { EditorLayer } from './EditorLayer';
import { ReactRender } from './ReactRender';

const Title = ({children}: PropsWithChildren) => <h2>{children}</h2>;
const Title = ({ children }: PropsWithChildren) => <h2>{children}</h2>;

const Wrapper = ({children}: PropsWithChildren) => (
const Wrapper = ({ children }: PropsWithChildren) => (
<div
{...css({
overflowX: 'auto',
position: 'relative',
padding: '0 20px 20px',
boxShadow: '0 0 13px -10px',
borderRadius: '20px',
borderRadius: '16px',
minWidth: '300px',
width: '100%',
boxShadow: '0px 3px 10px 0px rgba(16, 60, 78, 0.15)'
})}
>
{children}
Expand All @@ -31,19 +31,21 @@ export const CompiledCode = ({
showCompiledCode,
showCompiledCSS,
showRender,
useTest
}: {
showCompiledCode?: boolean;
showCompiledCSS?: boolean;
showRender?: boolean;
useTest?: boolean
}) => {
const data = useAtom(transformAtom);

let layerProps: React.ComponentProps<typeof EditorLayer> = {};

if (data.status === 'error') {
layerProps = {variant: 'error', children: data.error.toString()};
layerProps = { variant: 'error', children: data.error.toString() };
} else if (data.status === 'pending') {
layerProps = {variant: 'compiling', children: 'Compiling...'};
layerProps = { variant: 'compiling', children: 'Compiling...' };
}

const content = (
Expand Down Expand Up @@ -105,7 +107,7 @@ export const CompiledCode = ({
>
{content}

<EditorLayer {...css({borderRadius: '20px'})} {...layerProps} />
<EditorLayer {...css({ borderRadius: useTest ? '8px' : '20px' })} {...layerProps} />
</div>
);
};
20 changes: 11 additions & 9 deletions @docs/website/components/playground/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Head from 'next/head';

import {css} from 'taddy';
import { css } from 'taddy';

import {Column, Row} from '../layout';
import { Column, Row } from '../layout';

import {LiveEditor} from './LiveEditor';
import {Options} from './Options';
import {CompiledCode} from './CompiledCode';
import { LiveEditor } from './LiveEditor';
import { Options } from './Options';
import { CompiledCode } from './CompiledCode';

import {createStore} from '@reatom/core';
import {context} from '@reatom/react';
import { createStore } from '@reatom/core';
import { context } from '@reatom/react';

export default function Playground({
initialCode,
Expand All @@ -18,13 +18,15 @@ export default function Playground({
showCompiledCSS,
showRender,
persistent,
useTest
}: {
initialCode?: string;
showOptions?: boolean;
showCompiledCode?: boolean;
showCompiledCSS?: boolean;
showRender?: boolean;
persistent?: boolean;
useTest?: boolean
}) {
const store = createStore();

Expand All @@ -38,7 +40,7 @@ export default function Playground({
></script>
</Head>

<Column gap={4} {...css({background: 'white'})}>
<Column gap={4} {...css({ background: 'white' })}>
{showOptions && <Options />}

<Row gap={4}>
Expand All @@ -48,7 +50,7 @@ export default function Playground({
/>

<CompiledCode
{...{showCompiledCode, showCompiledCSS, showRender}}
{...{ showCompiledCode, showCompiledCSS, showRender, useTest }}
/>
</Row>
</Column>
Expand Down
1 change: 1 addition & 0 deletions @docs/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@taddy/babel-plugin": "^0.1.0-alpha.0",
"@taddy/next-plugin": "^0.1.0-alpha.0",
"filer": "1.4.1",
"framer-motion": "^10.16.4",
"history": "5.3.0",
"lz-string": "1.5.0",
"next": "13.2.4",
Expand Down
Loading