Skip to content

Commit

Permalink
Retargeting question-info CSS (#85)
Browse files Browse the repository at this point in the history
* Retargeting question-info CSS

* Add note about exercises.json

* Bring the font size and margins back down

* Update version
  • Loading branch information
RoyEJohnson authored Jan 30, 2025
1 parent 5e89234 commit bea6052
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ UI components for OpenStax assessments.
- `yarn test` run tests and get coverage results
- `yarn lint` run eslint
- `yarn ladle serve` run Ladle server at http://localhost:61000 to view component stories

Note: exercises.json needs to be created at the top level for ladle
See src/components/Print.stories.tsx
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openstax/assessment-components",
"version": "1.2.5",
"version": "1.2.6",
"license": "MIT",
"source": "./src/index.ts",
"types": "./dist/src/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ const StepCardHeader = styled.div`
line-height: 3rem;
letter-spacing: -0.72px;
div.question-info {
h2.question-info {
display: flex;
align-items: baseline;
font-weight: bold;
font-size: inherit;
margin: inherit;
.question-id {
font-weight: normal;
Expand Down
10 changes: 5 additions & 5 deletions src/components/__snapshots__/Card.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`StepCard matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -55,7 +55,7 @@ exports[`StepCard matches snapshot with more than one question 1`] = `
className="sc-bczRLJ eAXREJ"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -109,7 +109,7 @@ exports[`TaskStepCard can optionally provide task 1`] = `
className="sc-bczRLJ eAXREJ exercise-step"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -148,7 +148,7 @@ exports[`TaskStepCard can optionally provide type 1`] = `
className="sc-bczRLJ eAXREJ exercise-step"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -187,7 +187,7 @@ exports[`TaskStepCard matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ exercise-step"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down
10 changes: 5 additions & 5 deletions src/components/__snapshots__/Exercise.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`Exercise using step data matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -203,7 +203,7 @@ exports[`Exercise with question state data matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -442,7 +442,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -767,7 +767,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down Expand Up @@ -1078,7 +1078,7 @@ exports[`Exercise with question state data shows a detailed solution 1`] = `
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf hbFgnH"
className="sc-dkzDqf ihThJf"
>
<div>
<h2
Expand Down

0 comments on commit bea6052

Please sign in to comment.