Don't use flex on inputs
This commit is contained in:
@@ -106,16 +106,18 @@ function EmbedDialogInner({
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[a.flex_row, a.gap_sm]}>
|
<View style={[a.flex_row, a.gap_sm]}>
|
||||||
<TextField.Root>
|
<View style={[a.flex_1]}>
|
||||||
<TextField.Icon icon={CodeBrackets} />
|
<TextField.Root>
|
||||||
<TextField.Input
|
<TextField.Icon icon={CodeBrackets} />
|
||||||
label={_(msg`Embed HTML code`)}
|
<TextField.Input
|
||||||
editable={false}
|
label={_(msg`Embed HTML code`)}
|
||||||
selection={{start: 0, end: snippet.length}}
|
editable={false}
|
||||||
value={snippet}
|
selection={{start: 0, end: snippet.length}}
|
||||||
style={{}}
|
value={snippet}
|
||||||
/>
|
style={{}}
|
||||||
</TextField.Root>
|
/>
|
||||||
|
</TextField.Root>
|
||||||
|
</View>
|
||||||
<Button
|
<Button
|
||||||
label={_(msg`Copy code`)}
|
label={_(msg`Copy code`)}
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import {
|
|||||||
ViewStyle,
|
ViewStyle,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
|
|
||||||
|
import {HITSLOP_20} from '#/lib/constants'
|
||||||
import {mergeRefs} from '#/lib/merge-refs'
|
import {mergeRefs} from '#/lib/merge-refs'
|
||||||
import {HITSLOP_20} from 'lib/constants'
|
|
||||||
import {android, atoms as a, useTheme, web} from '#/alf'
|
import {android, atoms as a, useTheme, web} from '#/alf'
|
||||||
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
||||||
import {Props as SVGIconProps} from '#/components/icons/common'
|
import {Props as SVGIconProps} from '#/components/icons/common'
|
||||||
@@ -73,7 +73,7 @@ export function Root({children, isInvalid = false}: RootProps) {
|
|||||||
return (
|
return (
|
||||||
<Context.Provider value={context}>
|
<Context.Provider value={context}>
|
||||||
<View
|
<View
|
||||||
style={[a.flex_row, a.align_center, a.relative, a.flex_1, a.px_md]}
|
style={[a.flex_row, a.align_center, a.relative, a.w_full, a.px_md]}
|
||||||
{...web({
|
{...web({
|
||||||
onClick: () => inputRef.current?.focus(),
|
onClick: () => inputRef.current?.focus(),
|
||||||
onMouseOver: onHoverIn,
|
onMouseOver: onHoverIn,
|
||||||
|
|||||||
@@ -32,6 +32,27 @@ export function Forms() {
|
|||||||
label="Text field"
|
label="Text field"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<View style={[a.flex_row, a.gap_sm]}>
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
{
|
||||||
|
width: '50%',
|
||||||
|
},
|
||||||
|
]}>
|
||||||
|
<TextField.Root>
|
||||||
|
<TextField.Icon icon={Globe} />
|
||||||
|
<TextField.Input
|
||||||
|
value={value}
|
||||||
|
onChangeText={setValue}
|
||||||
|
label="Text field"
|
||||||
|
/>
|
||||||
|
</TextField.Root>
|
||||||
|
</View>
|
||||||
|
<Button label="Submit" size="large" variant="solid" color="primary">
|
||||||
|
<ButtonText>Submit</ButtonText>
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
|
||||||
<TextField.Root>
|
<TextField.Root>
|
||||||
<TextField.Icon icon={Globe} />
|
<TextField.Icon icon={Globe} />
|
||||||
<TextField.Input
|
<TextField.Input
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {ScrollView, View} from 'react-native'
|
import {ScrollView, View} from 'react-native'
|
||||||
|
|
||||||
|
import {isWeb} from '#/platform/detection'
|
||||||
import {useSetThemePrefs} from '#/state/shell'
|
import {useSetThemePrefs} from '#/state/shell'
|
||||||
import {isWeb} from 'platform/detection'
|
|
||||||
import {CenteredView} from '#/view/com/util/Views'
|
import {CenteredView} from '#/view/com/util/Views'
|
||||||
import {ListContained} from 'view/screens/Storybook/ListContained'
|
import {ListContained} from '#/view/screens/Storybook/ListContained'
|
||||||
import {atoms as a, ThemeProvider, useTheme} from '#/alf'
|
import {atoms as a, ThemeProvider, useTheme} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {Breakpoints} from './Breakpoints'
|
import {Breakpoints} from './Breakpoints'
|
||||||
@@ -80,9 +80,8 @@ function StorybookInner() {
|
|||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Buttons />
|
<Forms />
|
||||||
|
|
||||||
<Dialogs />
|
|
||||||
<ThemeProvider theme="light">
|
<ThemeProvider theme="light">
|
||||||
<Theming />
|
<Theming />
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
@@ -93,16 +92,17 @@ function StorybookInner() {
|
|||||||
<Theming />
|
<Theming />
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
|
|
||||||
|
<Buttons />
|
||||||
<Typography />
|
<Typography />
|
||||||
<Spacing />
|
<Spacing />
|
||||||
<Shadows />
|
<Shadows />
|
||||||
<Buttons />
|
<Buttons />
|
||||||
<Icons />
|
<Icons />
|
||||||
<Links />
|
<Links />
|
||||||
<Forms />
|
|
||||||
<Dialogs />
|
<Dialogs />
|
||||||
<Menus />
|
<Menus />
|
||||||
<Breakpoints />
|
<Breakpoints />
|
||||||
|
<Dialogs />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
|
|||||||
Reference in New Issue
Block a user