Skip to content

Commit 41007df

Browse files
aritra24nailo2c
authored andcommitted
Standardize copy in details page (apache#47804)
The different details pages had two different types of copy buttons, one clipboard and another clipboard with text. Since the clipboard with text was only used in the rendered json field. Replaced that to clipboard.
1 parent 5621ccb commit 41007df

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

airflow/ui/src/components/RenderedJsonField.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
import { Flex, Spacer, type FlexProps } from "@chakra-ui/react";
19+
import { Flex, type FlexProps } from "@chakra-ui/react";
2020
import { useTheme } from "next-themes";
2121
import ReactJson, { type ReactJsonViewProps } from "react-json-view";
2222

23-
import { ClipboardRoot, ClipboardButton } from "src/components/ui";
23+
import { ClipboardRoot, ClipboardIconButton } from "src/components/ui";
2424

2525
type Props = {
2626
readonly content: object;
@@ -32,7 +32,7 @@ const RenderedJsonField = ({ content, jsonProps, ...rest }: Props) => {
3232
const { theme } = useTheme();
3333

3434
return (
35-
<Flex {...rest} p={2}>
35+
<Flex {...rest}>
3636
<ReactJson
3737
displayDataTypes={false}
3838
enableClipboard={false}
@@ -46,9 +46,8 @@ const RenderedJsonField = ({ content, jsonProps, ...rest }: Props) => {
4646
theme={theme === "dark" ? "monokai" : "rjv-default"}
4747
{...jsonProps}
4848
/>
49-
<Spacer />
5049
<ClipboardRoot value={contentFormatted}>
51-
<ClipboardButton />
50+
<ClipboardIconButton />
5251
</ClipboardRoot>
5352
</Flex>
5453
);

0 commit comments

Comments
 (0)