fix(dashboard): Profile styling (#7481)

This commit is contained in:
Kasper Fabricius Kristensen
2024-05-27 22:11:54 +02:00
committed by GitHub
parent 2efa016c6e
commit e7091cfbb7
2 changed files with 19 additions and 10 deletions

View File

@@ -3,8 +3,8 @@ import { Language } from "./types"
export const languages: Language[] = [
{
code: "en-US",
display_name: "English (US)",
code: "en",
display_name: "English",
ltr: true,
date_locale: enUS,
},

View File

@@ -1,7 +1,8 @@
import { PencilSquare } from "@medusajs/icons"
import { UserDTO } from "@medusajs/types"
import { Button, Container, Heading, StatusBadge, Text } from "@medusajs/ui"
import { Container, Heading, StatusBadge, Text } from "@medusajs/ui"
import { useTranslation } from "react-i18next"
import { Link } from "react-router-dom"
import { ActionMenu } from "../../../../../components/common/action-menu"
import { languages } from "../../../../../i18n/languages"
type ProfileGeneralSectionProps = {
@@ -22,13 +23,21 @@ export const ProfileGeneralSection = ({ user }: ProfileGeneralSectionProps) => {
{t("profile.manageYourProfileDetails")}
</Text>
</div>
<Link to="/settings/profile/edit">
<Button size="small" variant="secondary">
{t("actions.edit")}
</Button>
</Link>
<ActionMenu
groups={[
{
actions: [
{
label: t("actions.edit"),
to: "edit",
icon: <PencilSquare />,
},
],
},
]}
/>
</div>
<div className="grid grid-cols-2 items-center px-6 py-4">
<div className="text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4">
<Text size="small" leading="compact" weight="plus">
{t("fields.name")}
</Text>