useBreakpointValue
一个 React Hook,根据响应式设计中不同的屏幕尺寸返回不同的值。
导入 Hook
import { useBreakpointValue } from 'rsuite';示例
响应式的改变头像大小
响应式的改变堆栈方向
API
useBreakpointValue
function useBreakpointValue<T>(
mediaQueries: Record<string | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs', T>,
options?: {
defaultValue?: T;
}
): T;