Changed image alignment
Some checks failed
ci / Check if version upgrade (push) Has been cancelled
ci / create_github_release (push) Has been cancelled
ci / test (push) Has been cancelled

This commit is contained in:
Tom Butcher 2025-08-04 01:46:03 +01:00
parent a890c85c74
commit 5073fd3b77
2 changed files with 27 additions and 4 deletions

View File

@ -166,6 +166,9 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
{(() => {
const node = !(auth !== undefined && auth.showUsername && !auth.showResetCredentials) ? (
<Flex gap={"large"} align="center" style={{ paddingBottom: "8px" }}>
<Title level={2} style={{ marginBottom: "0", flexGrow: 1 }}>
{headerNode}
</Title>
{client.attributes.logoUri && (
<img
src={client.attributes.logoUri}
@ -173,9 +176,6 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
style={{ maxHeight: "64px", maxWidth: "100%", marginBottom: "5px" }}
/>
)}
<Title level={2} style={{ marginBottom: "0" }}>
{headerNode}
</Title>
</Flex>
) : (
<>

View File

@ -13,7 +13,21 @@ export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
render: () => <KcPageStory />
render: () => (
<KcPageStory
kcContext={{
client: {
attributes: {
logoUri: "https://cdn.tombutcher.work/logos/gitea-logo.png",
policyUri: "https://twitter.com/en/tos",
tosUri: "https://twitter.com/en/privacy"
},
name: "Twitter",
clientId: "twitter-client-id"
}
}}
/>
)
};
export const WithEmailAsUsername: Story = {
@ -23,6 +37,15 @@ export const WithEmailAsUsername: Story = {
realm: {
loginWithEmailAllowed: true,
registrationEmailAsUsername: true
},
client: {
attributes: {
logoUri: "https://cdn.tombutcher.work/logos/grafana-logo.png",
policyUri: "https://twitter.com/en/tos",
tosUri: "https://twitter.com/en/privacy"
},
name: "Twitter",
clientId: "twitter-client-id"
}
}}
/>