import {Disclosure, DisclosurePanel, DisclosureTitle, Link} from '@react-spectrum/s2'; import React from 'react'; import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; export function S2FAQ() { return (
I'm getting a "Could not statically evaluate macro argument" error. This indicates that your style macro has a condition that isn't evaluable at build time. This can happen for a variety of reasons such as if you've referenced non-constant variables within your style macro or if you've called non-macro functions within your style macro. If you are using Typescript, it can be as simple as forgetting to add as const to your own defined reusable macro. I'm seeing a ton of duplicate rules being generated and/or my dev tools are very slow. Please make sure you've followed the best practices listed above. I tried to pass my style macro to "UNSAFE_className" but it doesn't work. The style macro is not meant to be used with UNSAFE_className. Overrides to the Spectrum styles is highly discouraged, consider styling an equivalent React Aria Component instead. I'm coming from S1, but where are Flex/Grid/etc? These no longer exist. Please style <div>, <span>, and other standard HTML elements with the style macro instead. Where can I find a list of what values are supported by the style macro? See the following page for a full list of what values are supported by the style macro.
); }