Skip to content

Commit

Permalink
✨ Legger til prop i Formfield for å endre størrelse
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrognes committed Nov 21, 2024
1 parent 160ce34 commit 0b78c9a
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions packages/aap-felles-css/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 2.0.28

## 2.0.27

## 2.0.26
Expand Down
2 changes: 1 addition & 1 deletion packages/aap-felles-css/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.27",
"version": "2.0.28",
"name": "@navikt/aap-felles-css",
"author": "NAV",
"homepage": "https://github.com/navikt/aap-felles-frontend#readme",
Expand Down
2 changes: 2 additions & 0 deletions packages/aap-felles-prettier/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 2.0.28

## 2.0.27

## 2.0.26
Expand Down
2 changes: 1 addition & 1 deletion packages/aap-felles-prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@navikt/aap-felles-prettier",
"author": "NAV",
"version": "2.0.27",
"version": "2.0.28",
"main": "index.json",
"license": "MIT",
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/aap-felles-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 2.0.28

### Patch Changes

- Legger til prop i FormField for å endre størrelse på felter

## 2.0.27

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/aap-felles-react/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.27",
"version": "2.0.28",
"name": "@navikt/aap-felles-react",
"author": "NAV",
"homepage": "https://github.com/navikt/aap-felles-frontend#readme",
Expand Down
13 changes: 12 additions & 1 deletion packages/aap-felles-react/src/Form/FormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface Props<FormFieldIds extends FieldValues> {
}

export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFieldIds>) => {
const { formField, form, children, className, horizontalRadio } = props;
const { formField, form, children, className, horizontalRadio, size } = props;

return (
<>
Expand All @@ -40,6 +40,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
type={formField.type}
control={form.control}
rules={formField.rules}
size={size}
hideLabel={formField.hideLabel}
description={formField.description}
readOnly={formField.readOnly}
Expand All @@ -52,6 +53,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
label={formField.label}
control={form.control}
rules={formField.rules}
size={size}
hideLabel={formField.hideLabel}
description={formField.description}
readOnly={formField.readOnly}
Expand All @@ -66,6 +68,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
hideLabel={formField.hideLabel}
description={formField.description}
rules={formField.rules}
size={size}
horisontal={horizontalRadio}
readOnly={formField.readOnly}
>
Expand All @@ -82,6 +85,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
label={formField.label}
control={form.control}
rules={formField.rules}
size={size}
hideLabel={formField.hideLabel}
description={formField.description}
fromDate={formField.fromDate}
Expand All @@ -98,6 +102,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
label={formField.label}
control={form.control}
rules={formField.rules}
size={size}
hideLabel={formField.hideLabel}
description={formField.description}
readOnly={formField.readOnly}
Expand All @@ -111,6 +116,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
hideLabel={formField.hideLabel}
control={form.control}
rules={formField.rules}
size={size}
description={formField.description}
readOnly={formField.readOnly}
className={className}
Expand All @@ -130,6 +136,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
hideLabel={formField.hideLabel}
control={form.control}
rules={formField.rules}
size={size}
readOnly={formField.readOnly}
className={className}
>
Expand All @@ -148,6 +155,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
description={formField.description}
control={form.control}
rules={formField.rules}
size={size}
readOnly={formField.readOnly}
className={className}
>
Expand All @@ -162,6 +170,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
description={formField.description}
control={form.control}
rules={formField.rules}
size={size}
hideLabel={formField.hideLabel}
readOnly={formField.readOnly}
className={className}
Expand All @@ -177,6 +186,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
control={form.control}
hideLabel={formField.hideLabel}
rules={formField.rules}
size={size}
description={formField.description}
readOnly={formField.readOnly}
options={formField.options.map((option) => mapToValuePair(option))}
Expand All @@ -190,6 +200,7 @@ export const FormField = <FormFieldIds extends FieldValues>(props: Props<FormFie
control={form.control}
hideLabel={formField.hideLabel}
rules={formField.rules}
size={size}
description={formField.description}
readOnly={formField.readOnly}
options={formField.options.map((option) => mapToValuePair(option))}
Expand Down
2 changes: 2 additions & 0 deletions packages/aap-felles-utils-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 2.0.28

## 2.0.27

## 2.0.26
Expand Down
2 changes: 1 addition & 1 deletion packages/aap-felles-utils-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.27",
"version": "2.0.28",
"name": "@navikt/aap-felles-utils-client",
"author": "NAV",
"homepage": "https://github.com/navikt/aap-felles-frontend#readme",
Expand Down
2 changes: 2 additions & 0 deletions packages/aap-felles-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 2.0.28

## 2.0.27

## 2.0.26
Expand Down
2 changes: 1 addition & 1 deletion packages/aap-felles-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.27",
"version": "2.0.28",
"name": "@navikt/aap-felles-utils",
"author": "NAV",
"homepage": "https://github.com/navikt/aap-felles-frontend#readme",
Expand Down
2 changes: 2 additions & 0 deletions packages/eslint-config-aap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 2.0.28

## 2.0.27

## 2.0.26
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-aap/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@navikt/eslint-config-aap",
"author": "NAV",
"version": "2.0.27",
"version": "2.0.28",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\"",
Expand Down

0 comments on commit 0b78c9a

Please sign in to comment.