@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 832 B
Source Map (JSON)
{"version":3,"file":"use-breakpoint-state.cjs","names":["useBreakpointValue"],"sources":["../../../../src/hooks/use-breakpoint/use-breakpoint-state.ts"],"sourcesContent":["\"use client\"\n\nimport type { ResponsiveObject } from \"../../core\"\nimport { useState } from \"react\"\nimport { useBreakpointValue } from \"./use-breakpoint-value\"\n\n/**\n * `useBreakpointState` is a custom hook that takes a responsive object as an initial state and returns a state corresponding to the current breakpoint.\n *\n * @see https://yamada-ui.com/docs/hooks/use-breakpoint-state\n */\nexport const useBreakpointState = <Y>(\n initialState: ResponsiveObject<Y, false>,\n) => {\n const state = useBreakpointValue(initialState)\n\n return useState(state)\n}\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAa,sBACX,iBACG;AAGH,4BAFcA,gDAAmB,aAAa,CAExB"}