Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/docs #60

Merged
merged 23 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/docs/docs/pages/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Examples

## [Showcase](https://github.com/jantimon/next-yak/tree/main/packages/example)

Small showcase of next-yak in action with all the features.
51 changes: 51 additions & 0 deletions packages/docs/docs/pages/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# FAQ

## Is next-yak production ready?

No, next-yak is still below the 1.0V mark but we are working hard to make it production ready.
Mad-Kat marked this conversation as resolved.
Show resolved Hide resolved

## Can I use next-yak with other frameworks than next.js?

Unfortunately not. If you want to use it in other frameworks just write an issue and we can discuss it.
Mad-Kat marked this conversation as resolved.
Show resolved Hide resolved

## Can I use next-yak with other CSS-in-JS libraries?
Mad-Kat marked this conversation as resolved.
Show resolved Hide resolved

Yes, you can use next-yak with other CSS-in-JS libraries. You can use it with styled-components, emotion, or any other library that
adds css classes to your components.

## Can I reference a component in another component?

Yes, you can reference it in the tagged template literal.
```jsx
import { styled } from 'next-yak';

const Button = styled.button`
background: #BF4F74;
`;

const Nav = styled.nav`
background: #BF4F74;
${Button} {
color: white;
}
`;
```

:::info

This doesn't work for components outside of the current file, as next-yak only considers one file at a time.

:::

## Why does next-yak always generate CSS variables when the values are static references that are known at build time?

It's very hard to determine if a value is static or dynamic. We decided to always generate CSS variables to be on the safe side
and add errors if we detect that a value is static but a CSS variable is used.

## Can I use next-yak with TypeScript?

Yes, of course. Almost all code of next-yak is written in TypeScript and we have some TypeScript tests.
Mad-Kat marked this conversation as resolved.
Show resolved Hide resolved

## Can I contribute to next-yak?

Yes, of course. We are happy about every contribution. Just write an issue or a pull request [here](https://github.com/jantimon/next-yak)
Loading
Loading