From 40f7ce0f97b8ab409ba8df9b3d7b4e43df21683b Mon Sep 17 00:00:00 2001 From: "Malin J." Date: Mon, 28 Oct 2024 10:04:48 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20to=20tailwind?= =?UTF-8?q?=20#2569=20(#2570)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ♻️ refactor to tailwind #2569 * ✏️ Small adjustment to negative margin #2569 --- web/components/src/Accordion/Item.tsx | 8 ++------ .../topicPages/Form/CareerFairForm.tsx | 20 ++++--------------- web/pageComponents/topicPages/Form/Form.tsx | 14 +++---------- .../careersContactForm/CareersContactForm.tsx | 8 ++------ 4 files changed, 11 insertions(+), 39 deletions(-) diff --git a/web/components/src/Accordion/Item.tsx b/web/components/src/Accordion/Item.tsx index d2a12c27b..54d69b8df 100644 --- a/web/components/src/Accordion/Item.tsx +++ b/web/components/src/Accordion/Item.tsx @@ -1,9 +1,5 @@ -import styled from 'styled-components' import { AccordionItem } from '@chakra-ui/react' -const StyledItem = styled(AccordionItem)` - border-bottom: 1px solid var(--grey-40); -` export type AccordionItemProps = { id: number children: React.ReactNode @@ -11,8 +7,8 @@ export type AccordionItemProps = { export const Item = ({ id, children, ...rest }: AccordionItemProps) => { return ( - + {children} - + ) } diff --git a/web/pageComponents/topicPages/Form/CareerFairForm.tsx b/web/pageComponents/topicPages/Form/CareerFairForm.tsx index afa006fac..446a7cf91 100644 --- a/web/pageComponents/topicPages/Form/CareerFairForm.tsx +++ b/web/pageComponents/topicPages/Form/CareerFairForm.tsx @@ -11,7 +11,6 @@ import { FormSubmitSuccessBox, FormSubmitFailureBox, } from '@components' -import styled from 'styled-components' import { BaseSyntheticEvent, useState } from 'react' import FriendlyCaptcha from './FriendlyCaptcha' @@ -27,15 +26,6 @@ type FormValues = { preferredLang: string } -const StyledHelper = styled.p` - margin-top: calc(var(--space-small) * -1); - font-size: var(--typeScale-0); -` - -const StyledCheckBox = styled(Checkbox)` - padding-bottom: var(--space-medium); -` - const CareerFairForm = () => { const intl = useIntl() const [submitButtonEnabled, setSubmitButtonEnabled] = useState(false) @@ -264,13 +254,13 @@ const CareerFairForm = () => { id: 'career_fair_form_visit_equinor', defaultMessage: 'Would like to visit Equinor office or facility', }) && ( - +

{intl.formatMessage({ id: 'career_fair_form_visit_equinor_helper_text', defaultMessage: 'Please be aware that we only offer visits to a few selected locations. Please specify your preferred location and we will revert to you as soon as we can.', })} - +

)} )} @@ -319,10 +309,8 @@ const CareerFairForm = () => { /> )} /> -
- -
- { const { title, ingress, downloads } = data @@ -37,9 +29,9 @@ const Form = ({ data, anchor, className }: { data: FormData; anchor?: string; cl <> <> {downloads && ( - +
{downloads.length > 0 && } - +
)} @@ -50,7 +42,7 @@ const Form = ({ data, anchor, className }: { data: FormData; anchor?: string; cl return (
- {title && } + {title && } {ingress && } {renderForm(variant)} diff --git a/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx b/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx index 3b1bb7d2d..36c3053e6 100644 --- a/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx +++ b/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx @@ -13,7 +13,6 @@ import { } from '@components' import { BaseSyntheticEvent, useState } from 'react' import FriendlyCaptcha from '../FriendlyCaptcha' -import styled from 'styled-components' import getCatalogType from './getRequestType' type FormValues = { @@ -28,10 +27,6 @@ type FormValues = { supportingDocuments: string } -const StyledCheckBox = styled(Checkbox)` - padding-bottom: var(--space-medium); -` - const CareersContactForm = () => { const intl = useIntl() const [submitButtonEnabled, setSubmitButtonEnabled] = useState(false) @@ -363,7 +358,8 @@ const CareersContactForm = () => {
-