Skip to content

Commit

Permalink
CR - Move CSS inside of component folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mirhamasala committed Feb 11, 2025
1 parent 266526c commit 5efed44
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion apps/site/src/app/_components/CopyToClipboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { TouchTarget } from '@/types/touchTargetType'
import { NOTIFICATION_DIALOG_DURATION_MS } from '@/constants/notificationDialogDuration'

import { Icon } from '@/components/Icon'
import { NotificationDialog } from '@/components/NotificationDialog'
import { NotificationDialog } from '@/components/NotificationDialog/NotificationDialog'

type CopyToClipboardProps = {
text: string
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/app/_components/NewsletterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Button } from '@/components/Button'
import { ControlledForm } from '@/components/Form/ControlledForm'
import { ControlledFormInput } from '@/components/Form/ControlledFormInput'
import type { IconProps } from '@/components/Icon'
import { NotificationDialog } from '@/components/NotificationDialog'
import { NotificationDialog } from '@/components/NotificationDialog/NotificationDialog'

const NewsletterSchema = z.object({
email: z
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* animations.css */
@keyframes slide-in-from-top {
from {
transform: translateY(-100%);
}
to {
transform: translateY(0);
}
}

@keyframes shrink-and-fade-out {
from {
transform: scale(1);
opacity: 1;
}
to {
transform: scale(0.9);
opacity: 0;
}
}

.animate-slide-in-from-top {
animation: slide-in-from-top 300ms cubic-bezier(0.41, 0.73, 0.51, 1.02);
}

.animate-shrink-and-fade-out {
animation: shrink-and-fade-out 150ms ease-in forwards;
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { clsx } from 'clsx'

import { Icon, type IconProps } from '@/components/Icon'

import './NotificationDialog.css'

type NotificationDialogProps = {
isOpen: boolean
setIsOpen: (arg: boolean) => void
Expand Down
24 changes: 0 additions & 24 deletions apps/site/src/app/_styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,6 @@
--color-brand-800: #08072e;

--spacing-readable: 60ch;

--animate-slide-in-from-top: slide-in-from-top 300ms
cubic-bezier(0.41, 0.73, 0.51, 1.02);
--animate-shrink-and-fade-out: shrink-and-fade-out 150ms ease-in forwards;

@keyframes slide-in-from-top {
from {
transform: translateY(-100%);
}
to {
transform: translateY(0);
}
}

@keyframes shrink-and-fade-out {
from {
transform: scale(1);
opacity: 1;
}
to {
transform: scale(0.9);
opacity: 0;
}
}
}

@utility brand-outline {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { NOTIFICATION_DIALOG_ERROR_DURATION_MS } from '@/constants/notificationD

import { useUpdateSearchParams } from '@/hooks/useUpdateSearchParams'

import { NotificationDialog } from '@/components/NotificationDialog'
import { NotificationDialog } from '@/components/NotificationDialog/NotificationDialog'

type ErrorMessageProps = {
message: string
Expand Down

0 comments on commit 5efed44

Please sign in to comment.