Skip to content

Commit

Permalink
Jim/fieldset legend style (#138)
Browse files Browse the repository at this point in the history
* form summary from v1 api

* default vals

* split into two PRs
  • Loading branch information
jimmoffet authored May 22, 2024
1 parent 09a42bb commit 376e3e2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/design/src/Form/components/Address/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Address: PatternComponent<AddressComponentProps> = props => {
const { register } = useFormContext();
return (
<fieldset className="usa-fieldset width-full">
<legend className="usa-legend font-body-5 text-uppercase line-height-body-4">Mailing address</legend>
<legend className="usa-legend usa-legend--large text-uppercase line-height-body-4">Mailing address</legend>
<label
className={classNames('usa-label', {
'usa-label--error': props.childProps.streetAddress.error,
Expand Down
2 changes: 1 addition & 1 deletion packages/design/src/Form/components/Fieldset/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Fieldset: PatternComponent<FieldsetProps> = props => {
return (
<fieldset className="usa-fieldset width-full margin-top-4">
{props.legend !== '' && props.legend !== undefined && (
<legend className="usa-legend font-body-5 text-uppercase line-height-body-4 margin-top-2 margin-bottom-1">{props.legend}</legend>
<legend className="usa-legend usa-legend--large line-height-body-4 margin-top-2 margin-bottom-1">{props.legend}</legend>
)}

{props.children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type RadioGroupProps = {
export default function RadioGroup({ legend, children }: RadioGroupProps) {
return (
<div className="usa-fieldset">
<legend className="usa-legend">{legend}</legend>
<legend className="usa-legend usa-legend--large">{legend}</legend>
{children}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/design/src/Form/components/additional-fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const SelectField = ({ field }: { field: Field }) => {
export const RadioField = ({ field }: { field: Field }) => {
return (
<fieldset className="usa-fieldset width-full">
<legend className="usa-legend font-body-5 text-uppercase line-height-body-4">{field.label}</legend>
<legend className="usa-legend usa-legend--large text-uppercase line-height-body-4">{field.label}</legend>
{field.options?.map((option, index) => (
<div key={index} className="usa-radio">
<input
Expand Down
4 changes: 2 additions & 2 deletions packages/design/src/Form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const FormContents = ({
<div className="usa-form-group">
<div className="usa-form-group">
<fieldset className="usa-fieldset width-full">
<legend className="usa-legend font-body-5 text-uppercase line-height-body-4">
<legend className="usa-legend usa-legend--large text-uppercase line-height-body-4">
County where you live
</legend>
<label className="usa-label">Name of your county *</label>
Expand All @@ -203,7 +203,7 @@ const FormContents = ({
<div className="usa-form-group">
<div className="usa-form-group">
<fieldset className="usa-fieldset width-full">
<legend className="usa-legend font-body-5 text-uppercase line-height-body-4">
<legend className="usa-legend usa-legend--large text-uppercase line-height-body-4">
Your current name
</legend>
<label className="usa-label">First name *</label>
Expand Down

0 comments on commit 376e3e2

Please sign in to comment.