-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): add section on global urls
- Loading branch information
Showing
6 changed files
with
86 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
frontend/components/workstation/globalAllowURLListInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import {Textarea, RadioGroup, Radio, Stack} from "@navikt/ds-react"; | ||
|
||
interface GlobalAllowURLListInputProps { | ||
urlList: string[]; | ||
onDisableGlobalURLAllowList: (event: any) => void; | ||
} | ||
|
||
const GlobalAllowUrlListInput: React.FC<GlobalAllowURLListInputProps> = ({ urlList, onDisableGlobalURLAllowList }) => { | ||
return ( | ||
<div className="flex gap-2 flex-col"> | ||
<RadioGroup | ||
legend="Behold globale åpninger" | ||
defaultValue="false" | ||
onChange={onDisableGlobalURLAllowList} | ||
description="Vi har lagt til en liste over URL-er som er administrert sentralt, og tilgjengelig for alle brukere. Dette er åpninger som vil gi deg en bedre brukeropplevelse. | ||
Hvis du har behov, så kan du melde deg av disse URL-ene, men vi anbefaler at du ikke gjør det." | ||
> | ||
<Stack gap="0 6" direction={{ xs: "column", sm: "row" }} wrap={false}> | ||
<Radio value="false">Ja (anbefalt)</Radio> | ||
<Radio value="true">Nei</Radio> | ||
</Stack> | ||
</RadioGroup> | ||
<Textarea | ||
label="URL-er som er lagt til globalt" | ||
defaultValue={urlList.join("\n")} | ||
size="small" | ||
maxRows={2500} | ||
readOnly | ||
resize | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default GlobalAllowUrlListInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters