feat(components): add Page and SearchInput
This commit is contained in:
parent
65b10524b2
commit
d40b16e3a2
2 changed files with 37 additions and 0 deletions
19
src/components/Page.tsx
Normal file
19
src/components/Page.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { Components } from '@revenge-mod/discord/design'
|
||||
import type { DiscordModules } from '@revenge-mod/discord/types'
|
||||
import { ReactNative } from '@revenge-mod/react'
|
||||
|
||||
export default function Page(props: DiscordModules.Components.StackProps) {
|
||||
return (
|
||||
<Components.Stack style={styles.page} spacing={24} {...props}>
|
||||
{props.children}
|
||||
</Components.Stack>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = ReactNative.StyleSheet.create({
|
||||
page: {
|
||||
flex: 1,
|
||||
paddingHorizontal: 16,
|
||||
paddingTop: 12,
|
||||
},
|
||||
})
|
||||
18
src/components/SearchInput.tsx
Normal file
18
src/components/SearchInput.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Components } from '@revenge-mod/discord/design'
|
||||
import { lookupGeneratedIconComponent } from '@revenge-mod/utils/discord'
|
||||
|
||||
import type { DiscordModules } from '@revenge-mod/discord/types'
|
||||
|
||||
const MagnifyingGlassIcon = lookupGeneratedIconComponent('MagnifyingGlassIcon')
|
||||
|
||||
export default function SearchInput(props: DiscordModules.Components.TextInputProps) {
|
||||
return (
|
||||
<Components.TextInput
|
||||
leadingIcon={MagnifyingGlassIcon}
|
||||
size="md"
|
||||
placeholder="Search"
|
||||
returnKeyType="search"
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue