-
-
Notifications
You must be signed in to change notification settings - Fork 48
docs: add suport for t-rex-ui 1.3.0 #981
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,7 @@ const config = { | |
| }, | ||
| }, | ||
| ], | ||
| require.resolve('@swmansion/t-rex-ui/preset'), | ||
| ], | ||
|
|
||
| stylesheets: [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,37 @@ | ||
| import { | ||
| ButtonStyling, | ||
| BorderStyling, | ||
| HomepageButton, | ||
| } from '@swmansion/t-rex-ui/dist/components/HomepageButton'; | ||
| import styles from './styles.module.css'; | ||
| import { JSX, useEffect } from 'react'; | ||
| import {HireUsSection} from '@swmansion/t-rex-ui' | ||
| import './styles.module.css'; | ||
|
|
||
| export const HireUsSection = ({ | ||
| export const HireUsSectionWrapper = ({ | ||
| content, | ||
| href, | ||
| }: { | ||
| content?: string; | ||
| content?: string | JSX.Element; | ||
| href: string; | ||
| }) => { | ||
| return ( | ||
| <div className={styles.hireUsSectionWrapper}> | ||
| <div className={styles.hireUsTitleContainer}> | ||
| <h2> | ||
| We are <span>Software Mansion</span> | ||
| </h2> | ||
| </div> | ||
| <p className={styles.hireUsSectionBody}> | ||
| We’re a software company built around improving developer experience and bringing innovative clients' ideas to life. We're pushing boundaries and delivering high-performance solutions that scale. | ||
| <br />< br /> | ||
| Need help integrating React Native Audio API into your project or want to discuss your ideas? | ||
| </p> | ||
|
|
||
| <div className={styles.hireUsButton}> | ||
| <HomepageButton | ||
| href={href} | ||
| title="Let's talk" | ||
| target="_blank" | ||
| backgroundStyling={ButtonStyling.SECTION} | ||
| borderStyling={BorderStyling.SECTION} | ||
| /> | ||
| </div> | ||
| </div> | ||
| const resolvedContent = content || ( | ||
| <> | ||
| We’re a software company built around improving developer experience and | ||
| bringing innovative clients' ideas to life. We're pushing boundaries and | ||
| delivering high-performance solutions that scale. | ||
| <br /> | ||
| <br /> | ||
| Need help integrating React Native Audio API into your project or want to | ||
| discuss your ideas? | ||
| </> | ||
| ); | ||
|
|
||
| // TODO: Remove this hack after we add support for custom button text in the HireUsSection component | ||
maciejmakowski2003 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // Optional TODO: Contribute to t-rex-ui to add support for custom button text and remove this hack | ||
| useEffect(() => { | ||
| const btn = document.querySelector("[class*='hireUsSection'] [class*='homepageButtonLink'] > [class*='homepageButton']"); | ||
| if (btn) { | ||
| const textNode = Array.from(btn.childNodes).find(n => n.nodeType === Node.TEXT_NODE); | ||
| if (textNode) { | ||
| textNode.textContent = "Let's talk"; | ||
| } | ||
| } | ||
| }, []); | ||
|
|
||
| return <HireUsSection content={resolvedContent} href={href} /> | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,77 +1,14 @@ | ||
| .hireUsSectionWrapper { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| gap: 2.5rem; | ||
| margin-bottom: 16rem; | ||
| margin-top: 6.5rem; | ||
| } | ||
|
|
||
| @media (max-width: 996px) { | ||
| .hireUsSectionWrapper { | ||
| margin-top: 3.5rem; | ||
| margin-bottom: 10rem; | ||
| } | ||
| } | ||
|
|
||
| @media (max-width: 768px) { | ||
| .hireUsSectionWrapper { | ||
| gap: 1.5rem; | ||
| margin-top: 0; | ||
| margin-bottom: 5rem !important; | ||
| } | ||
| .hireUsTitleContainer h2 { | ||
| font-size: 42px !important; | ||
| } | ||
| .hireUsSectionBody { | ||
| font-size: 20px !important; | ||
| } | ||
| } | ||
|
|
||
| @media (max-width: 420px) { | ||
| .hireUsSectionWrapper { | ||
| margin-top: 0; | ||
| margin-bottom: 4rem !important; | ||
| [class*='hireUsSectionBody'] { | ||
| font-size: 18px !important; | ||
| } | ||
| } | ||
|
|
||
| .hireUsTitleContainer { | ||
| display: flex; | ||
| flex-direction: row; | ||
| gap: 1rem; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .hireUsTitleContainer h2 { | ||
| text-align: center; | ||
| font-size: 64px; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .hireUsTitleContainer h2 > span { | ||
| color: var(--swm-hire-us-section-title); | ||
| } | ||
|
|
||
| [data-theme='dark'] .hireUsTitleContainer h2 > span { | ||
| color: var(--swm-hire-us-section-title); | ||
| } | ||
|
|
||
| .hireUsSectionBody { | ||
| font-size: 20px; | ||
| text-wrap: balance; | ||
| text-align: center; | ||
| font-weight: 400; | ||
| [class*='hireUsSectionBody'] { | ||
| font-size: 20px !important; | ||
| color: var(--swm-navy-light-80); | ||
| } | ||
|
|
||
| [data-theme='dark'] .hireUsSectionBody { | ||
| [data-theme='dark'] [class*='hireUsSectionBody'] { | ||
| color: var(--swm-navy-dark-40); | ||
| } | ||
|
|
||
|
|
||
| @media (max-width: 420px) { | ||
| .hireUsSectionBody { | ||
| font-size: 18px !important; | ||
| } | ||
| } |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.