MCPcopy Create free account
hub / github.com/adobe/react-spectrum / AppFrame

Function AppFrame

packages/dev/s2-docs/pages/s2/home/ExampleApp.tsx:259–407  ·  view source on GitHub ↗
({children, inert, hidden, page, onPageChange}: any)

Source from the content-addressed store, hash-verified

257}
258
259export function AppFrame({children, inert, hidden, page, onPageChange}: any) {
260 let {direction} = useLocale();
261
262 return (
263 <ColorSchemeProvider>
264 <div
265 inert={inert || hidden}
266 style={hidden ? {visibility: 'hidden', position: 'absolute'} : undefined}
267 className={style({
268 display: 'grid',
269 gridTemplateAreas: {
270 default: ['toolbar', 'content'],
271 [SM]: ['toolbar toolbar', 'sidebar content']
272 },
273 gridTemplateRows: ['auto', '1fr'],
274 gridTemplateColumns: {
275 default: ['minmax(0, 1fr)'],
276 [SM]: ['auto', 'minmax(0, 1fr)']
277 },
278 height: 'full',
279 '--radius': {
280 type: 'borderTopStartRadius',
281 value: 'lg'
282 },
283 borderRadius: '--radius',
284 borderTopRadius: 'var(--app-frame-radius-top, var(--radius))',
285 overflow: 'clip',
286 boxSizing: 'border-box',
287 '--shadow': {
288 type: 'boxShadow',
289 value: 'elevated'
290 },
291 boxShadow: 'var(--app-frame-shadow, var(--shadow))',
292 backgroundColor: 'layer-1',
293 isolation: 'isolate'
294 })}>
295 <div
296 className={style({
297 gridArea: 'toolbar',
298 display: 'flex',
299 padding: 16,
300 paddingStart: 20,
301 boxSizing: 'border-box',
302 gap: 20,
303 alignItems: 'center',
304 width: 'full'
305 })}>
306 {/* <ActionButton isQuiet aria-label="Menu">
307 <MenuHamburger />
308 </ActionButton> */}
309 <AdobeLogo size={24} />
310 <span
311 className={style({
312 font: 'title',
313 display: {
314 default: 'none',
315 [SM]: 'inline'
316 }

Callers

nothing calls this directly

Calls 1

useLocaleFunction · 0.90

Tested by

no test coverage detected