Skip to content

Commit

Permalink
fix faq style
Browse files Browse the repository at this point in the history
  • Loading branch information
glassonion1 committed Oct 19, 2023
1 parent f3c72e3 commit 1fc07a2
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@sakura-ui/config": "^0.1.5",
"@sakura-ui/core": "^0.1.17",
"@sakura-ui/core": "^0.1.18",
"@sakura-ui/forms": "^0.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
6 changes: 5 additions & 1 deletion examples/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ const App = () => {
<div className="my-8">
<H2>Frequently Asked Questions</H2>
<Faq>
<Question>Why do you need an FAQ section?</Question>
<Question>
Why do you need an FAQ section?
<br />
FAQ Sample
</Question>
<Answer>
A good website experience anticipates the needs of a user at every
stage of their journey, and on every page. It’s intuitive and all
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sakura-ui/core",
"version": "0.1.17",
"version": "0.1.18",
"type": "module",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/components/Faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export interface FaqProps extends React.ComponentPropsWithoutRef<'dl'> {}
const headingStyle = `
text-h-med-m
sm:text-h-med
!leading-none
`

export const Faq = (props: FaqProps) => {
Expand Down Expand Up @@ -75,7 +74,7 @@ export const Answer = (props: AnswerProps) => {
itemType="https://schema.org/Answer"
{...restProps}
>
<span className={headingStyle} aria-hidden="true">
<span className={cx(headingStyle, '!leading-none')} aria-hidden="true">
A
</span>
<span itemProp="text">{children}</span>
Expand Down
129 changes: 128 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1fc07a2

Please sign in to comment.