1- import React , { useMemo } from 'react'
21import clsx from 'clsx'
3- import { getTranslation , type Languages , type TranslationKey } from '@/i18n'
2+ import React , { useMemo } from 'react'
3+ import { type Languages , type TranslationKey , getTranslation } from '@/i18n'
44import {
5- RichText ,
65 ChineseRichText ,
76 ChineseStringText ,
8- StringText ,
9- ShorterStringText ,
7+ RichText ,
108 ShorterChineseStringText ,
9+ ShorterStringText ,
10+ StringText ,
1111} from './Data'
1212
1313export const DEFAULT_WIDTH_VALUE = 100
@@ -26,7 +26,7 @@ const ExampleContainer = React.forwardRef<
2626 return (
2727 < div
2828 ref = { ref }
29- className = "w-full box-border p-3 bg-[var(--sl-color-gray-6)] my-6 "
29+ className = "my-6 box-border w-full bg-[var(--sl-color-gray-6)] p-3 "
3030 style = { {
3131 border :
3232 '1px solid color-mix(in srgb, var(--sl-color-gray-5), transparent 25%)' ,
@@ -50,14 +50,17 @@ const ExampleFormLabel: React.FC<ExampleFormLabelProps> = ({
5050 lang,
5151 labelKey,
5252} ) => {
53- const titleCls = clsx ( 'flex flex-shrink-0' , lang === 'zh' ? 'w-24' : 'w-34' )
53+ const titleCls = clsx (
54+ 'flex shrink-0' ,
55+ lang === 'zh' ? 'w-[96px]' : 'w-[136px]' ,
56+ )
5457 return < span className = { titleCls } > { getTranslation ( lang , labelKey ) } </ span >
5558}
5659
5760const ExampleFormItem : React . FC < {
5861 children : React . ReactNode
5962} > = ( { children } ) => {
60- return < div className = "flex items-center gap-3 my-6 " > { children } </ div >
63+ return < div className = "my-6 flex items-center gap-3" > { children } </ div >
6164}
6265
6366const inputCls = 'w-100 max-w-3/4 cursor-pointer'
0 commit comments