index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-current-state.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useCurrentState, Link, Button, Spacer } from 'components' export const meta = { title: 'useCurrentState', group: 'Development', index: 101, } ## useCurrentState Get **the latest value** in functional component. By default, `state` in a Re...
3,100
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-input.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useInput, Input, Button, Spacer } from 'components' export const meta = { title: 'useInput', group: 'Enhancement', index: 10, } ## useInput `useInput` provides automatic binding for component [Input](/en-us/components/input), which can re...
3,101
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-keyboard.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useKeyboard, KeyCode, KeyMod, Keyboard, Input, Link } from 'components' export const meta = { title: 'useKeyboard', group: 'Enhancement', index: 5, } ## useKeyboard React hooks for listen to multiple keyboard events. <Playground desc="...
3,102
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-media-query.mdx
import { Layout, Playground, PlaygroundTitle, Attributes } from 'lib/components' import { useMediaQuery, Link, Code, Spacer } from 'components' import NextLink from 'next/link' export const meta = { title: 'useMediaQuery', group: 'Utilities', } ## useMediaQuery CSS media query hooks, it is implemented through th...
3,103
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-modal.mdx
import { Layout, Playground, Attributes } from "lib/components"; import { useModal, Modal, Button } from "components"; export const meta = { title: "useModal", group: "Enhancement", index: 11, }; ## useModal `useModal` provides automatic binding for component [Modal](/en-us/components/modal), which can reduce ...
3,104
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-scale.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, useTheme } from 'components' export const meta = { title: 'useScale', group: 'Development', index: 103, } ## useScale Remember the elastic scaling feature mentioned in the [scale](/en-us/guide/scale 'Scale') subsection, which gave...
3,105
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-tabs.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useTabs, Tabs, Button, Spacer } from 'components' export const meta = { title: 'useTabs', group: 'Enhancement', index: 11, } ## useTabs `useTabs` provides automatic binding for component [Tabs](/en-us/components/tabs), which can reduce th...
3,106
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-theme.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, useTheme } from 'components' export const meta = { title: 'useTheme', group: 'Development', index: 100, } ## useTheme This hooks can get the theme states of Geist within any component, and can track changes in states. In the defau...
3,107
0
petrpan-code/geist-org/geist-ui/pages/en-us
petrpan-code/geist-org/geist-ui/pages/en-us/hooks/use-toast.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useToasts, Button, Spacer, Link } from 'components' export const meta = { title: 'useToast', group: 'Enhancement', index: 12, } ## useToast Display an important message globally. <Playground desc="Basic usage." scope={{ Button, useTo...
3,108
0
petrpan-code/geist-org/geist-ui/pages
petrpan-code/geist-org/geist-ui/pages/zh-cn/index.tsx
import React from 'react' import { NextPage } from 'next' import { useTheme, Grid } from 'components' import PackageIcon from '@geist-ui/icons/package' import FeatherIcon from '@geist-ui/icons/feather' import GitHubIcon from '@geist-ui/icons/github' import { HomeCell } from 'lib/components' const Home: NextPage<unknow...
3,109
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/auto-complete.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { AutoComplete, Spacer, Badge, Text, Grid, Code } from 'components' import { useState, useRef, useEffect } from 'react' export const meta = { title: '自动完成 Autocomplete', group: '数据录入', index: 104, } ## Autocomplete / 自动完成 输入框的自动完成控制。 <Play...
3,110
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/avatar.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Avatar, Spacer } from 'components' export const meta = { title: '头像 Avatar', group: '数据展示', } ## Avatar / 头像 头像代表一个用户或团队,堆叠的头像表示了一个群体。 <Playground desc="`Avatar` 组件包含了圆形与方形。" scope={{ Avatar, Spacer }} code={` () => { const url = '...
3,111
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/badge.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Badge, Spacer, Button, Link, Avatar, useTheme } from 'components' import NextLink from 'next/link' export const meta = { title: '徽章 Badge', group: '数据展示', } ## Badge / 徽章 显示一个需要注意的指标。 <Playground scope={{ Badge, Spacer }} desc="展示一个数字或...
3,112
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/breadcrumbs.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Breadcrumbs, Spacer } from 'components' import NextLink from 'next/link' import Home from '@geist-ui/icons/home' import Inbox from '@geist-ui/icons/inbox' export const meta = { title: '面包屑 Breadcrumbs', group: '导航', } ## Breadcrumbs / 面包屑导航 ...
3,113
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/button-dropdown.mdx
import { ButtonDropdown, Spacer } from 'components' import { Layout, Attributes, Playground } from 'lib/components' import Plus from '@geist-ui/icons/plus' export const meta = { title: '下拉按钮 Btn Dropdown', group: '导航', index: 105, } ## Button Dropdown / 下拉按钮 显示相关的操作。 <Playground scope={{ ButtonDropdown }} ...
3,114
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/button-group.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, Spacer, ButtonGroup } from 'components' export const meta = { title: '按钮组 Button Group', group: '数据录入', } ## Button Group / 按钮组 展示一组具备相关性的按钮。 <Playground scope={{ Button, ButtonGroup }} code={` <ButtonGroup> <Button>One</Butt...
3,115
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/button.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, Spacer, Grid, Code } from 'components' import Settings from '@geist-ui/icons/settings' import UserX from '@geist-ui/icons/userX' import Power from '@geist-ui/icons/power' export const meta = { title: '按钮 Button', group: '通用', } ## Bu...
3,116
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/capacity.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Capacity, Spacer, useTheme } from 'components' export const meta = { title: '容量 Capacity', group: '数据展示', } ## Capacity / 容量 显示一个容量指示器。 <Playground scope={{ Capacity, Spacer }} code={` <> <Capacity value={15} /> <Spacer /> <Capacit...
3,117
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/card.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Card, Grid, Link, Spacer, Text, Image, Divider, Code } from 'components' export const meta = { title: '卡片 Card', group: '表面', } ## Card / 卡片 基础的组件容器。 <Playground scope={{ Card }} code={` <Card> <p>一个基础的卡片。</p> </Card> `} /> <Playgro...
3,118
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/checkbox.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Checkbox, Spacer } from 'components' export const meta = { title: '复选框 Checkbox', group: '数据录入', } ## Checkbox / 复选框 用于表示多个可选项。 <Playground desc="设置 `initialChecked` 属性初始的状态。" scope={{ Checkbox }} code={` <Checkbox initialChecked={...
3,119
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/code.mdx
import { Code, Note, Link, Text } from 'components' import NextLink from 'next/link' import { Layout, Playground, Attributes, ParsedCodes } from 'lib/components' export const meta = { title: '代码 Code', group: '通用', } ## Code / 代码 以标准化的方式展示源代码。想要展示 Shell 代码片段或是一个命令?可以试试 [Snippet](/zh-cn/components/snippet) (片段) 组...
3,120
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/collapse.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Collapse, Spacer, Text, Code } from 'components' export const meta = { title: '折叠框 Collapse', group: '表面', } ## Collapse / 折叠框 折叠显示大段的文本或组件内容,通常也被称为手风琴。 <Playground scope={{ Collapse, Text }} desc="默认只展示标题。" code={` <Collapse.Group> ...
3,121
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/description.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Description, Code } from 'components' export const meta = { title: '描述 Description', group: '数据展示', } ## Description / 描述 显示简短的信息和描述内容。 <Playground desc="`Description` 组件默认包含标题和内容。" scope={{ Description }} code={` <Description title=...
3,122
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/display.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Display, Code, Snippet, Image } from 'components' export const meta = { title: '陈列框 Display', group: '数据展示', } ## Display / 陈列框 以居中对齐的方式展示重要的信息或图像。 <Playground desc="为一张图片添加描述文本。" scope={{ Display, Image }} code={` <Display shadow ...
3,123
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/divider.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Divider, Text } from 'components' export const meta = { title: '分割线 Divider', group: '其他', } ## Divider / 分割线 用于分割不同内容块的线条。 <Playground desc="基础示例。" scope={{ Divider, Text }} code={` <> <Text> 在服务端驱动型协商机制或者主动协商机制中,浏览器(或者其他任何类型的...
3,124
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/dot.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Dot } from 'components' export const meta = { title: '点 Dot', group: '数据展示', } ## Dot / 点 点可以表达语句的状态,或是仅用于分类装饰。 <Playground scope={{ Dot }} code={` <> <Dot style={{ marginRight: '15px' }} /> <Dot style={{ marginRight: '15px' }} typ...
3,125
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/drawer.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Drawer, Button } from 'components' export const meta = { title: '抽屉 Drawer', group: '反馈', } ## Drawer / 抽屉 固定在屏幕边缘的可交互元素组。 <Playground desc="基础示例。" scope={{ Drawer, Button }} code={` () => { const [state, setState] = React.useState...
3,126
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/fieldset.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Fieldset, Button, Text, Divider } from 'components' export const meta = { title: '控件组 Fieldset', group: '表面', } ## Fieldset / 控件组 在一个集合内显示相关的信息。 <Playground desc="在 `Actions` 内可以添加自定义的按钮。" scope={{ Fieldset, Button }} code={` <Fields...
3,127
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/file-tree.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Tree, useToasts } from 'components' export const meta = { title: '文件树 File Tree', group: '数据展示', } ## File-Tree / 文件树 使用树结构展示文件与文件夹列表。 <Playground title="Basic" desc="所有的文件和文件夹都会被自动排序以便于浏览。" scope={{ Tree }} code={` <Tree> <Tree....
3,128
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/grid.mdx
import { Layout, Playground, ExampleBlock, Attributes } from 'lib/components' import { Grid, Card } from 'components' import PlaygroundTitle from 'lib/components/playground/title' export const meta = { title: '栅格 Grid', group: '布局', } ## Grid / 栅格 强大的流体风格布局容器。 `Grid` 组件使用 **动态 CSS 媒体查询** 实现响应式布局,同时具备超高的性能与极小的体积...
3,129
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/icons.mdx
import { Layout, Playground, Attributes, IconsGallery } from 'lib/components' import Title from 'lib/components/playground/title' import { Spacer, Tabs, Snippet } from 'components' import Github from '@geist-ui/icons/github' export const meta = { title: '图标 Icons', group: '通用', } ## Icons / 图标 显示 SVG 格式的标准向量图形。 ...
3,130
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/image.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Image, Display, Code } from 'components' export const meta = { title: '图片 Image', group: '数据展示', } ## Image / 图片 展示图片内容。 <Playground scope={{ Image }} code={` <Image width="280px" height="160px" src="/images/geist-banner.png" /> `} /> ...
3,131
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/index.js
import redirect from 'lib/redirect' export default redirect('/zh-cn/components/text')
3,132
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/input.mdx
import { Layout, Playground, Attributes } from 'lib/components' import GitIcon from '@geist-ui/icons/github' import { Input, Spacer, Button, Code, Text, Dot } from 'components' export const meta = { title: '输入框 Input', group: '数据录入', } ## Input / 输入框 处理用户的输入数据。 输入框组件包含额外的 Hooks,详情请参阅 [useInput](/zh-cn/hooks/use...
3,133
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/keyboard.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Keyboard } from 'components' export const meta = { title: '键盘 keyboard', group: '数据展示', } ## Keyboard / 键盘 显示用于键盘输入的按键字符。 组件 `Keyboard` 只用于展示布局样式,如需绑定按键事件,请阅读 [useKeyboard](/zh-cn/hooks/use-keyboard)。 <Playground scope={{ Keyboard }} ...
3,134
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/link.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Link, Text, Code, Spacer } from 'components' import NextLink from 'next/link' export const meta = { title: '链接 Link', group: '导航', } ## Link / 链接 网页之间的超链接。 <Playground desc="组件默认会为链接添加一个图标。" scope={{ Link }} code={` <Link href="#">通过...
3,135
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/loading.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Loading, Grid } from 'components' export const meta = { title: '加载中 Loading', group: '反馈', } ## Loading / 加载中 表示动作正在后台运行。 <Playground scope={{ Loading }} code={` <Loading /> `} /> <Playground title="文本" desc="在图标旁边定制一段文本。" scope...
3,136
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/modal.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Modal, Button, Code, useModal } from 'components' import { useState } from 'react' export const meta = { title: '对话框 Modal', group: '反馈', } ## Modal / 对话框 弹出显示需要额外注意或重要的内容。如果你仅需要提示文本信息,请考虑 [Toast](/zh-cn/components/toast) 组件。 对话框组件包含额外的 Ho...
3,137
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/note.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Note, Code } from 'components' export const meta = { title: '提示 Note', group: '反馈', } ## Note / 提示 显示一段用于提示的额外文本信息。 <Playground desc="显示文本信息或是组件内容。" scope={{ Note, Code }} code={` <Note><Code>caller</Code> 和 <Code>arguments</Code> 属性...
3,138
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/page.mdx
import { Page, Button } from 'components' import { Layout, Playground, Attributes, MockPage } from 'lib/components' export const meta = { title: '页面 Page', group: '布局', } ## Page / 页面 展示页面内容的通用容器。 <Playground desc="内容将会被展示在页面中间。" scope={{ Page, MockPage, Button }} code={` () => { const Child = () => ( ...
3,139
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/pagination.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Pagination, Spacer } from 'components' import ChevronRight from '@geist-ui/icons/chevronRight' import ChevronLeft from '@geist-ui/icons/chevronLeft' import ChevronRightCircle from '@geist-ui/icons/chevronRightCircle' import ChevronLeftCircle from ...
3,140
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/popover.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Popover, Spacer, Link } from 'components' import { useState } from 'react' export const meta = { title: '气泡卡片 Popover', group: '数据展示', } ## Popover / 气泡卡片 通过点击或鼠标移入触发的气泡风格弹出层。 <Playground desc="基础示例。" scope={{ Popover, Spacer, Link }} ...
3,141
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/progress.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Progress, Spacer, useTheme, Button } from 'components' import { useState } from 'react' export const meta = { title: '进度条 Progress', group: '反馈', } ## Progress / 进度条 展示事件或与之相关的任务进展。 <Playground scope={{ Progress }} code={` <Progress va...
3,142
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/radio.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Radio, Code, Text, Spacer } from 'components' import { useState } from 'react' export const meta = { title: '单选框 Radio', group: '数据录入', } ## Radio / 单选框 提供用户输入的选择项。 <Playground scope={{ Radio }} code={` <Radio checked={false}>选项 1</Rad...
3,143
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/rating.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Rating, Grid, Spacer } from 'components' import { useState } from 'react' import { Award, Github } from '@geist-ui/icons' export const meta = { title: '评分 Rating', group: '反馈', } ## Rating / 评分 以多个图标展示可互动的评分。 <Playground desc="设置初始值与回调事件...
3,144
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/select.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Select, Spacer, Code, Modal, useModal, Button } from 'components' export const meta = { title: '选择器 Select', group: '数据录入', } ## Select / 选择器 显示下拉列表选框。 对话框组件包含额外的 Hooks,详情请参阅 [useModal](/zh-cn/hooks/use-modal) 小节。 <Playground scope={{ S...
3,145
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/slider.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Slider, Spacer } from 'components' import { useState } from 'react' export const meta = { title: '滑动输入 Slider', group: '数据录入', } ## Slider / 滑动输入 展示当前值与一个可输入范围。 <Playground desc="允许点击和滑动事件。" scope={{ Slider }} code={` <Slider initial...
3,146
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/snippet.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Snippet, Spacer, Code } from 'components' export const meta = { title: '片段 Snippet', group: '其他', } ## Snippet / 片段 显示可拷贝的命令行代码片段。 <Playground desc="展示一个命令。" scope={{ Snippet }} code={` <Snippet text="yarn add @geist-ui/core" width="...
3,147
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/spacer.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Spacer, Grid } from 'components' export const meta = { title: '间距 Spacer', group: '布局', } ## Spacer / 间距 为排版提供标准化的空间。 <Playground title="垂直的" scope={{ Spacer, Grid }} code={` <Grid.Container> <Grid xs={24} style={{ background: '#44...
3,148
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/spinner.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Spinner } from 'components' export const meta = { title: '指示器 Spinner', group: '反馈', } ## Spinner / 指示器 表示一个动作正在进行中。 作为加载指示器,可以参阅类似组件 [Loading](/zh-cn/components/loading). <Playground scope={{ Spinner }} code={` <Spinner /> `} /> <At...
3,149
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/table.mdx
import { Layout, Playground, PlaygroundTitle, Attributes } from 'lib/components' import { Table, Spacer, Code, Text, Button } from 'components' export const meta = { title: '表格 Table', group: '数据展示', } ## Table / 表格 以规则的表格显示数据集。 <Playground desc="显示规则化的行和列。" scope={{ Table }} code={` () => { const data ...
3,150
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/tabs.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Tabs, Spacer, Link, Text, Button, Code } from 'components' import { useState } from 'react' import TwitterIcon from '@geist-ui/icons/twitter' import TwitchIcon from '@geist-ui/icons/twitch' export const meta = { title: '选项卡 Tabs', group: '导航'...
3,151
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/tag.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Tag, Spacer } from 'components' export const meta = { title: '标签 Tag', group: '数据展示', } ## Tag / 标签 标记文档的状态与功能。 <Playground scope={{ Tag, Spacer }} code={` <> <Tag>状态: 不稳定的</Tag> <Spacer /> <Tag>作者:佚名</Tag> </> `} /> <Playground...
3,152
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/text.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Text } from 'components' export const meta = { title: '文本 Text', group: '通用', index: 10, } ## Text / 文本 使用预定义的排版样式显示文本。 <Playground title="标题" scope={{ Text }} code={` <Text h1>开始我们的 Geist 之旅。</Text> `} /> <Playground title="段落"...
3,153
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/textarea.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Textarea, Spacer, useInput, Button, Code } from 'components' import { useState } from 'react' export const meta = { title: '文本输入框 Textarea', group: '数据录入', } ## Textarea / 文本输入框 获取用户输入的多行文本。 <Playground desc="基础示例。" scope={{ Textarea }...
3,154
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/toast.mdx
import { Layout, Attributes } from 'lib/components' export const meta = { title: '通知 Toast', group: '反馈', } ## Toast / 通知 通知组件仅支持 Hooks 方式调用,请在 [useToast](/zh-cn/hooks/use-toast 'Toast Hooks') 文档中查看详情。 <Attributes edit="/pages/zh-cn/components/toast.mdx" /> export default ({ children }) => <Layout meta={meta}>...
3,155
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/toggle.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Toggle, Spacer } from 'components' export const meta = { title: '开关 Toggle', group: '数据录入', } ## Toggle / 开关 显示布尔值的状态。 <Playground scope={{ Toggle, Spacer }} code={` <> <Toggle /> <Spacer h={.5} /> <Toggle initialChecked /> </> `...
3,156
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/tooltip.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Tooltip, Spacer, Grid, Button, Link, Badge, Code, Text } from 'components' export const meta = { title: '文字提示 Tooltip', group: '数据展示', } ## Tooltip / 文字提示 在悬停时显示额外的提示信息。 <Playground desc="基础示例。" scope={{ Tooltip }} code={` <Tooltip t...
3,157
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/components/user.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { User, Spacer } from 'components' export const meta = { title: '用户 User', group: '数据展示', } ## User / 用户 展示用户的介绍或是社交链接。 <Playground desc="仅展示用户名。" scope={{ User, Spacer }} code={` <User src="/images/avatar.png" name="Witt" /> `} /> <P...
3,158
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/bundle-size.mdx
import Layout from 'lib/components/layout' export const meta = { title: '构建体积', group: '快速上手', index: 11, } ## 构建体积 一个包含 Geist 所有组件的包大约为 [111kb](https://bundle.js.org/?q=@geist-ui/react) (Gzipped),对于现代化客户端应用来说这仍旧是不错的大小, 并不会影响您的应用性能。在工程的实践中,推荐你在应用内将 Geist 切割为独立的 chunk 以获得固定的缓存。 对于更好的首屏加载速度,推荐尝试 [服务端渲染](/zh-cn/...
3,159
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/colors.mdx
import { Code, Display } from 'components' import { Layout, Colors } from 'lib/components' export const meta = { title: '色彩', group: '定制化', index: 5, } ## 色彩 默认的色彩展示。 ### 主要的 你可以在自己的应用中使用这些色彩,所有的色彩值都会跟随主题而变化。 想要自定义一些颜色?请阅读 [use-theme](/zh-cn/hooks/use-theme) 文档了解更多的细节。 <Display width="90%" caption={<span>从 ...
3,160
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/index.js
import redirect from 'lib/redirect' export default redirect('/zh-cn/guide/introduction')
3,161
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/installation.mdx
import Layout from 'lib/components/layout' import { Code, Spacer, Dot, Tabs, Snippet, Text } from 'components' export const meta = { title: '安装', group: '快速上手', index: 10, } ## 安装 ### 配置 请确认你的 [NodeJS](https://nodejs.org/zh-cn/download/) 处于最新版本, 并已有包管理器: [NPM](https://www.npmjs.com/) 或是 [Yarn](https://yarnpkg...
3,162
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/introduction.mdx
import Layout from 'lib/components/layout' import { Note } from 'components' export const meta = { title: '什么是 Geist UI', group: '快速上手', index: 5, } ## 介绍 ### 关于 **Geist UI** 是一个优雅美观,拥有浓厚 Geek 风格的 React 组件库, 灵感来自于 [Vercel](https://vercel.com?utm_source=geist-ui&utm_campaign=oss) 的设计风格。 借助 Geist 在文字排版、明暗表达、伸缩...
3,163
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/scale.mdx
import { Layout, Attributes, GridDemo } from 'lib/components' import { Note, Display, Button } from 'components' export const meta = { title: '可伸缩性', group: '定制化', index: 20, } ## 可伸缩性 <Note type="warning"> 此功能需要 Geist v2.2.0 或以上版本。如果你正在使用旧版本,请在试用前升级到最新。 </Note> Geist UI 的可伸缩特性赋予了每个组件极大的灵活性。你可以自由地缩放组件大小,改写组...
3,164
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/server-render.mdx
import Layout from 'lib/components/layout' export const meta = { title: '服务端渲染', group: '快速上手', index: 15, } ## 服务端渲染 **所有的 Geist UI 组件**都能完美适应服务端渲染,实际上,你现在所见的文档站点就是来自服务端渲染。 一个常见的 React 组件在服务端被渲染为 HTML 字符串通常包含两部分:HTML 骨架与样式, 它们共同构成了请求中返回的首个字符串,这能有效的保证用户尽可能早的阅读到页面内容 (而不需要等待额外地 JavaScript 资源加载与解析)。 在 Geist 中,你...
3,165
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/guide/themes.mdx
import Layout from 'lib/components/layout' export const meta = { title: '主题', group: '定制化', index: 10, } ## 主题 **Geist UI** 现在支持多种主题,并能以简单易用的方式随意切换或是创建新的主题,不需要任何配置与第三方库。 作为基础的选项,Geist UI 内置了两种可用的基础主题,`light` 和 `dark` (亮色和暗色)。 ### 切换主题 在默认主题之间切换只需要设置 `themeType` 的值即可,你可以参考以下步骤: 1. 确保 `GeistProvider` 与 `CssBa...
3,166
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/index.js
import redirect from 'lib/redirect' export default redirect('/zh-cn/hooks/use-keyboard')
3,167
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-body-scroll.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, Spacer, useBodyScroll, Text } from 'components' export const meta = { title: '锁定滚动 useBodyScroll', group: '实用工具', } ## useBodyScroll / 工具包 禁用 `Body` 或其他任何元素的滚动,这在显示弹窗或菜单时非常有帮助。 如果容器的滚动条在禁止滚动之前被自定义设置了宽度,那么在在禁止滚动后会为自动当前容器添加 `paddingR...
3,168
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-classes.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, useTheme } from 'components' export const meta = { title: '类名合并 useClasses', group: '开发者', index: 105, } ## useClasses 从技术实现上来说,这不是一个 Hooks,只是借用其命名规范的普通函数。(可以直接用于模板内) `useClasses` 可以将字符串、对象、表达式等混合转化为 class-names (字符串),并且移除其中多余的空格。...
3,169
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-click-away.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useClickAway, Link, Card, Spacer } from 'components' export const meta = { title: '点击他处 useClickAway', group: '实用工具', } ## useClickAway / 点击他处触发事件 检测点击事件是否在元素之外。 <Playground desc="点击绿色块外部才能触发回调。" scope={{ useClickAway }} code={` () =...
3,170
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-clipboard.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useClipboard, Link, Button, useToasts, Spacer } from 'components' export const meta = { title: '剪切板 useClipboard', group: '实用工具', } ## useClipboard / 拷贝至剪切板 拷贝字符串到剪切板。 <Playground scope={{ useClipboard, Button, useToasts }} code={` () ...
3,171
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-current-state.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useCurrentState, Link, Button, Spacer } from 'components' export const meta = { title: '当前值 useCurrentState', group: '开发者', index: 101, } ## useCurrentState / 获取当前值 在函数式组件内获取 **最新的值**。默认场景下,React 函数式组件只能获取渲染当时 `state` 的值,这并非是最新的。 这是一个获取最...
3,172
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-input.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useInput, Input, Button, Spacer } from 'components' export const meta = { title: '输入框绑定 useInput', group: '组件增强', index: 10, } ## useInput / 输入框绑定 `useInput` 提供对 [Input](/zh-cn/components/input) 组件的自动绑定功能,这可以有效减少模板代码量并提高开发者体验。 使用此 Hooks 与...
3,173
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-keyboard.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useKeyboard, KeyCode, KeyMod, Keyboard, Input, Link } from 'components' export const meta = { title: '键盘事件 useKeyboard', group: '组件增强', index: 5, } ## useKeyboard / 键盘事件 用户监听多个键盘事件的钩子。 <Playground desc="全局的键盘事件。" scope={{ useKeyboard...
3,174
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-media-query.mdx
import { Layout, Playground, PlaygroundTitle, Attributes } from 'lib/components' import { useMediaQuery, Link, Code, Spacer } from 'components' import NextLink from 'next/link' export const meta = { title: '媒体查询 useMediaQuery', group: '实用工具', } ## useMediaQuery / 媒体查询 用于 CSS 媒体查询的钩子,钩子通过 `MediaQuery` API 实现。如果你仅...
3,175
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-modal.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useModal, Modal, Button } from 'components' export const meta = { title: '对话框绑定 useModal', group: '组件增强', index: 11, } ## useModal / 对话框绑定 `useModal` 提供对 [Modal](/zh-cn/components/modal) 组件的自动绑定功能,这可以有效减少模板代码量并提高开发者体验。 使用此 hooks 与你手动添加 `R...
3,176
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-scale.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, useTheme } from 'components' export const meta = { title: '自定义缩放 useScale', group: '开发者', index: 103, } ## useScale / 自定义缩放 Remember the elastic scaling feature mentioned in the [scale](/zh-cn/guide/scale 'Scale') subsection, whic...
3,177
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-tabs.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useTabs, Tabs, Button, Spacer } from 'components' export const meta = { title: '选项卡绑定 useTabs', group: '组件增强', index: 11, } ## useTabs / 选项卡绑定 `useTabs` 提供对 [Tabs](/zh-cn/components/tabs) 组件的自动绑定功能,这可以有效减少模板代码量并提高开发者体验。 使用此 Hooks 与你手动添加 `...
3,178
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-theme.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { Button, useTheme } from 'components' export const meta = { title: '主题的状态 useTheme', group: '开发者', index: 100, } ## useTheme / 主题的状态 此 Hooks 可以帮助用户在任意组件中获取主题状态,同时追踪状态的变化。在默认场景下 (没有改变 `themeType` 时), Hooks 获取的值与 `Themes.getPresets` 是相同的。 通...
3,179
0
petrpan-code/geist-org/geist-ui/pages/zh-cn
petrpan-code/geist-org/geist-ui/pages/zh-cn/hooks/use-toast.mdx
import { Layout, Playground, Attributes } from 'lib/components' import { useToasts, Button, Spacer, Link } from 'components' export const meta = { title: '通知 useToast', group: '组件增强', index: 12, } ## useToast / 通知 显示重要的全局通知信息。 <Playground desc="基础示例。" scope={{ Button, useToasts }} code={` () => { cons...
3,180
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/public/_redirects
/powered-by-netlify https://www.netlify.com/?utm_source=github&utm_medium=geist-ui /move-to-core https://github.com/geist-org/geist-ui/discussions/677
3,181
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/babel.config.js
module.exports = { presets: [ [ '@babel/env', { bugfixes: true, modules: false, }, ], '@babel/react', '@babel/typescript', ], plugins: [ 'styled-jsx/babel', ['@babel/plugin-proposal-object-rest-spread', { loose: true }], ['@babel/plugin-transform-runti...
3,182
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/collect-meta.js
const fs = require('fs-extra') const path = require('path') const extractMetadata = require('extract-mdx-metadata') const metaLocales = require('./locales') const pagePrefix = path.join(__dirname, '../pages') const getTargetPath = locale => { return path.join(__dirname, '../lib/data/', `metadata-${locale}.json`) } c...
3,183
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/locales.js
module.exports = { 'zh-cn': { 'getting-started': '快速开始', customization: '定制化', components: '所有组件', guide: '上手指南', docs: '文档', }, 'en-us': {}, }
3,184
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/move-built-in.js
const { resolve, join } = require('path') const fs = require('fs-extra') const builtInPath = resolve(__dirname, 'built-in') const esmFolderPath = resolve(__dirname, '../esm') const cjsFolderPath = resolve(__dirname, '../dist') const builtInFiles = { esm: ['styled-jsx.es.js', 'styled-jsx-server.es.js'], cjs: ['style...
3,185
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/rollup.config.js
import commonjs from '@rollup/plugin-commonjs' import nodeResolve from '@rollup/plugin-node-resolve' import localResolve from 'rollup-plugin-local-resolve' import babel from 'rollup-plugin-babel' import fs from 'fs-extra' import path from 'path' const root = path.join(__dirname, '../') const componentsPath = path.join...
3,186
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/side-effects.js
const path = require('path') const fs = require('fs-extra') ;(async () => { const pkgPath = path.join(__dirname, '../package.json') const json = await fs.readJson(pkgPath) json.sideEffects = false await fs.writeJson(pkgPath, json, { spaces: 2 }) })()
3,187
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/tsconfig.json
{ "compilerOptions": { "baseUrl": "../", "outDir": "../dist", "paths": { "*": ["*"], "geist-ui": ["components/index.tsx"], "components/*": [ "components/*" ] }, "declaration": true, "emitDeclarationOnly": true, "strictNullChecks": true, "moduleResolution...
3,188
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/tsconfig.test.json
{ "compilerOptions": { "baseUrl": "../", "outDir": "../dist", "declaration": true, "emitDeclarationOnly": true, "strictNullChecks": true, "moduleResolution": "node", "esModuleInterop": true, "experimentalDecorators": true, "jsx": "react", "noUnusedParameters": true, "noUnus...
3,189
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/scripts/webpack.config.js
const fs = require('fs-extra') const path = require('path') const componentsPath = path.join(__dirname, '../components') module.exports = async () => { const files = await fs.readdir(componentsPath) const components = await Promise.all( files.map(async name => { const comPath = path.join(componentsPath,...
3,190
0
petrpan-code/geist-org/geist-ui/scripts
petrpan-code/geist-org/geist-ui/scripts/built-in/styled-jsx-server.es.js
import { server } from './styled-jsx.es' const { flushToHTML } = server export { server, flushToHTML } export default server
3,191
0
petrpan-code/geist-org/geist-ui/scripts
petrpan-code/geist-org/geist-ui/scripts/built-in/styled-jsx.cjs.js
'use strict' var React = require('react') function _interopDefaultLegacy(e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e } } var React__default = /*#__PURE__*/ _interopDefaultLegacy(React) var style$1 = {} var stylesheetRegistry = {} function hash(str) { var hash = 5381, i = st...
3,192
0
petrpan-code/geist-org/geist-ui/scripts
petrpan-code/geist-org/geist-ui/scripts/built-in/styled-jsx.es.js
import React from 'react' var style$1 = {} var stylesheetRegistry = {} function hash(str) { var hash = 5381, i = str.length while (i) { hash = (hash * 33) ^ str.charCodeAt(--i) } /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed * integers. Since we want the results to be ...
3,193
0
petrpan-code/geist-org/geist-ui/scripts
petrpan-code/geist-org/geist-ui/scripts/seeds/codesandbox.json
[{ "name": "Getting Started", "url": "https://codesandbox.io/s/geist-ui-n21e9" }, { "name": "With TypeScript", "url": "https://codesandbox.io/s/geist-ui-typescript-65td1" }]
3,194
0
petrpan-code/geist-org/geist-ui/scripts
petrpan-code/geist-org/geist-ui/scripts/seeds/links.json
[ { "name": "Discussions", "url": "https://github.com/geist-org/geist-ui/discussions" }, { "name": "Example projects", "url": "https://github.com/geist-org/geist-ui/tree/master/examples" }, { "name": "Create issue", "url": "https://github.com/geist-org/geist-ui/issues/new/choose" }, ...
3,195
0
petrpan-code/geist-org/geist-ui/scripts
petrpan-code/geist-org/geist-ui/scripts/seeds/presets.js
const codesandbox = require('./codesandbox.json') const links = require('./links.json') module.exports = codesandbox .map(item => ({ ...item, group: 'Codesandbox', })) .concat( links.map(item => ({ ...item, group: 'External', })), )
3,196
0
petrpan-code/geist-org/geist-ui/scripts
petrpan-code/geist-org/geist-ui/scripts/seeds/update.js
const path = require('path') const fs = require('fs-extra') const extractMetadata = require('extract-mdx-metadata') const pagePrefix = path.join(__dirname, '../../pages') const presets = require('./presets') const flattenArray = contents => { if (!Array.isArray(contents)) return contents return contents.reduce((pr...
3,197
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/tests/.babelrc.js
module.exports = { presets: ['@babel/env', '@babel/react', '@babel/typescript'], plugins: ['styled-jsx/babel-test', '@babel/plugin-transform-runtime'], }
3,198
0
petrpan-code/geist-org/geist-ui
petrpan-code/geist-org/geist-ui/tests/setup.ts
import '@testing-library/jest-dom/extend-expect' import enzyme from 'enzyme' /** * The official repository does not currently support React 17 * https://github.com/enzymejs/enzyme/issues/2429 */ import Adapter from '@wojtekmaj/enzyme-adapter-react-17' enzyme.configure({ adapter: new Adapter() })
3,199