@ndla/ui 50.9.18 → 50.9.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,7 @@ interface BaseProps {
27
27
  children?: ReactNode;
28
28
  visibleAlt?: string;
29
29
  error?: true | false;
30
+ hideOnLargeScreens?: boolean;
30
31
  first?: boolean;
31
32
  inGrid?: boolean;
32
33
  }
@@ -95,6 +96,11 @@ const BylineWrapper = styled.div`
95
96
  &[data-first="true"] {
96
97
  border-top: 1px solid ${colors.brand.light};
97
98
  }
99
+ &[data-hide-on-large-screens="true"] {
100
+ ${mq.range({ from: breakpoints.tablet })} {
101
+ display: none;
102
+ }
103
+ }
98
104
  `;
99
105
 
100
106
  const mobileStyling = css`
@@ -135,6 +141,7 @@ const EmbedByline = ({
135
141
  description,
136
142
  children,
137
143
  visibleAlt,
144
+ hideOnLargeScreens,
138
145
  first = true,
139
146
  inGrid = false,
140
147
  ...props
@@ -157,7 +164,12 @@ const EmbedByline = ({
157
164
  const captionAuthors = Object.values(authors).find((i) => i.length > 0) ?? [];
158
165
 
159
166
  return (
160
- <BylineWrapper data-top-rounded={topRounded} data-bottom-rounded={bottomRounded} data-first={first}>
167
+ <BylineWrapper
168
+ data-top-rounded={topRounded}
169
+ data-hide-on-large-screens={hideOnLargeScreens}
170
+ data-bottom-rounded={bottomRounded}
171
+ data-first={first}
172
+ >
161
173
  {description && <LicenseDescription description={description} />}
162
174
  {visibleAlt ? <StyledSpan>{`Alt: ${visibleAlt}`}</StyledSpan> : null}
163
175
  <RightsWrapper data-grid={inGrid}>
@@ -1110,6 +1110,8 @@ const messages = {
1110
1110
  enableArena: "Give {{user}} access to the arena.",
1111
1111
  noUsers: "No users found.",
1112
1112
  search: "Search for users",
1113
+ becameAdmin: "User '{{user}}' was elevated to administrator",
1114
+ becameNormalUser: "User '{{user}}' no longer has administrator access",
1113
1115
  },
1114
1116
  flags: {
1115
1117
  title: "Flag",
@@ -1110,6 +1110,8 @@ const messages = {
1110
1110
  enableArena: 'Gi "{{user}}" tilgang til arena.',
1111
1111
  noUsers: "Ingen brukere funnet.",
1112
1112
  search: "Søk etter brukere",
1113
+ becameAdmin: "Bruker '{{user}}' har fått administrator tilgang",
1114
+ becameNormalUser: "Bruker '{{user}}' har ikke lenger administrator tilgang",
1113
1115
  },
1114
1116
  flags: {
1115
1117
  title: "Flagg",
@@ -1110,6 +1110,8 @@ const messages = {
1110
1110
  enableArena: 'Gi "{{user}}" tilgang til arena.',
1111
1111
  noUsers: "Ingen brukarar funne.",
1112
1112
  search: "Søk etter brukarar",
1113
+ becameAdmin: "Brukar '{{user}}' har fått administrator tilgong",
1114
+ becameNormalUser: "Brukar '{{user}}' har ikkje lenger administrator tilgong",
1113
1115
  },
1114
1116
  flags: {
1115
1117
  title: "Flagg",
@@ -1112,6 +1112,8 @@ const messages = {
1112
1112
  enableArena: 'Gi "{{user}}" tilgang til arena.',
1113
1113
  noUsers: "Ingen brukere funnet.",
1114
1114
  search: "Søk etter brukere",
1115
+ becameAdmin: "Bruker '{{user}}' har fått administrator tilgang",
1116
+ becameNormalUser: "Bruker '{{user}}' har ikke lenger administrator tilgang",
1115
1117
  },
1116
1118
  flags: {
1117
1119
  title: "Flagg",
@@ -1114,6 +1114,8 @@ const messages = {
1114
1114
  enableArena: 'Gi "{{user}}" tilgang til arena.',
1115
1115
  noUsers: "Ingen brukere funnet.",
1116
1116
  search: "Søk etter brukere",
1117
+ becameAdmin: "Bruker '{{user}}' har fått administrator tilgang",
1118
+ becameNormalUser: "Bruker '{{user}}' har ikke lenger administrator tilgang",
1117
1119
  },
1118
1120
  flags: {
1119
1121
  title: "Flagg",