This commit is contained in:
2025-12-27 18:25:15 +03:00
parent 63a9425680
commit fde5f9de58
23 changed files with 688 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# UIProvider
`UIProvider` — точка управления темой/платформой/скином и CSS overrides.
## Import
```ts
import { UIProvider } from "@tria/ui";
```
## Config
```ts
type UIConfig = Partial<{
theme: "light" | "dark";
platform: "web" | "vk" | "tg";
skin: "web" | "ios" | "android";
root: HTMLElement;
vars: Record<`--${string}`, string>;
}>;
```
## Example
```tsx
<UIProvider config={{ theme: "light", platform: "vk", skin: "ios" }}>
...
</UIProvider>
```
## Notes
- избегайте deep-import UIProvider из внутренних путей — импортируйте из `@tria/ui`
- для `vars` используйте `useMemo`, чтобы не создавать новый объект на каждый рендер