-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #289 from WestpacGEL/280-article-page-article-lead…
…ing-text-on-top-as-a-component fixes #280 line-height container size
- Loading branch information
Showing
6 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/site/src/components/component-blocks/components/leading-text/leading-text.style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { tv } from 'tailwind-variants'; | ||
|
||
export const styles = tv({ | ||
base: 'typography-site-8 mx-0 mb-9 leading-[1.6] xsl:typography-site-7 xsl:leading-[1.6] md:-mx-16', | ||
base: 'typography-site-8 mx-0 mb-9 leading-[1.6] xsl:typography-site-7 xsl:leading-[1.6] md:-mx-17', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 81 additions & 1 deletion
82
apps/site/src/content/design-system/components/compacta/design/Error states/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,83 @@ | ||
When a user attempts to progress through the form, errors are captured at this point. Any Compacta that has an error will automatically open and highlight the error inline. | ||
|
||
Loading... | ||
```tsx | ||
() => { | ||
const [inputs, setInputs] = useState({}); | ||
|
||
const handleChange = e => { | ||
setInputs(prev => ({ ...prev, [e.target.name]: e.target.value })); | ||
}; | ||
|
||
return ( | ||
<Compacta> | ||
{({ id, setPrimaryTitle, setSecondaryTitle, setTertiaryTitle }) => ( | ||
<Form spacing="large"> | ||
<Form.Group> | ||
<Field | ||
label="Primary" | ||
hintMessage="Select your card insitution" | ||
errorMessage="Error message goes here if activated" | ||
> | ||
<Select | ||
name={`input-primary-${id}`} | ||
value={inputs[`input-primary-${id}`] || ''} | ||
onChange={e => { | ||
handleChange(e); | ||
setPrimaryTitle(e.target.value); | ||
}} | ||
width={30} | ||
invalid | ||
> | ||
<option>Select</option> | ||
<option>AMP Bank</option> | ||
<option>ANZ - Australia and New Zealand Banking Group</option> | ||
<option>Bank of Queensland</option> | ||
<option>Bendigo Bank</option> | ||
<option>CBA - Commonwealth Bank</option> | ||
<option>Macquarie Bank</option> | ||
<option>NAB - National Australian Bank</option> | ||
<option>Westpac Bank</option> | ||
</Select> | ||
</Field> | ||
</Form.Group> | ||
<Form.Group> | ||
<Field | ||
label="Account number" | ||
hintMessage="Refer to a statement from the card’s financial institution" | ||
errorMessage="Error message goes here if activated" | ||
> | ||
<Input | ||
name={`input-secondary-${id}`} | ||
value={inputs[`input-secondary-${id}`] || ''} | ||
onChange={e => { | ||
handleChange(e); | ||
setSecondaryTitle(e.target.value); | ||
}} | ||
width={30} | ||
invalid | ||
/> | ||
</Field> | ||
</Form.Group> | ||
<Form.Group> | ||
<InputField | ||
name={`input-tertiary-${id}`} | ||
value={inputs[`input-tertiary-${id}`] || ''} | ||
onChange={e => { | ||
handleChange(e); | ||
setTertiaryTitle(e.target.value); | ||
}} | ||
width={20} | ||
invalid | ||
errorMessage="Error message goes here if activated" | ||
before="$" | ||
label="Amount to transfer" | ||
> | ||
<Input invalid /> | ||
</InputField> | ||
</Form.Group> | ||
</Form> | ||
)} | ||
</Compacta> | ||
); | ||
}; | ||
``` |
a07b453
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gel-next-site – ./apps/site
gel-next-site-westpacgel.vercel.app
gel-next-site.vercel.app
gel-next-site-git-main-westpacgel.vercel.app