Skip to content

Commit

Permalink
[not verified] sort types
Browse files Browse the repository at this point in the history
  • Loading branch information
retrofox committed May 3, 2023
1 parent 3de02eb commit 3d4771e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import PrivacyAndRatingSettings from './privacy-and-rating-settings';
/**
* Types
*/
import type { VideoControlProps } from '../../types';
import type { PrivacyAndRatingPanelProps } from '../../types';
import type React from 'react';

/**
* React component that renders the main privacy and ratings panel.
*
* @param {VideoControlProps} props - Component props.
* @returns {React.ReactElement} - Panel to contain privacy and ratings settings.
* @param {PrivacyAndRatingPanelProps} props - Component props.
* @returns {React.ReactElement} Panel to contain privacy and ratings settings.
*/
export default function PrivacyAndRatingPanel( {
attributes,
setAttributes,
privateEnabledForSite,
}: VideoControlProps ): React.ReactElement {
}: PrivacyAndRatingPanelProps ): React.ReactElement {
return <PrivacyAndRatingSettings { ...{ attributes, setAttributes, privateEnabledForSite } } />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ import {
/**
* Types
*/
import type { VideoControlProps } from '../../types';
import type { PrivacyAndRatingPanelProps } from '../../types';
import type React from 'react';

/**
* React component that renders the settings within the privacy and ratings panel.
*
* @param {VideoControlProps} props - Component props.
* @returns {React.ReactElement} - Settings to change video's privacy and ratings.
* @param {PrivacyAndRatingPanelProps} props - Component props.
* @returns {React.ReactElement} Settings to change video's privacy and ratings.
*/
export default function PrivacyAndRatingSettings( {
attributes,
setAttributes,
privateEnabledForSite,
videoBelongToSite,
}: VideoControlProps & { videoBelongToSite: boolean } ): React.ReactElement {
}: PrivacyAndRatingPanelProps ): React.ReactElement {
const { privacySetting, rating, allowDownload, displayEmbed } = attributes;

const privacyLabels = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,13 @@ export default function VideoPressEdit( {
/>

<PrivacyAndRatingPanel
{ ...{ attributes, setAttributes, isRequestingVideoData, privateEnabledForSite } }
{ ...{
attributes,
setAttributes,
isRequestingVideoData,
privateEnabledForSite,
videoBelongToSite,
} }
/>
</InspectorControls>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ export type PosterPanelProps = VideoControlProps & {
videoBelongToSite?: boolean;
};

export type PrivacyAndRatingPanelProps = VideoControlProps & {
videoBelongToSite?: boolean;
};

export type VideoEditProps = VideoControlProps;

export type DetailsPanelProps = VideoControlProps & {
Expand Down

0 comments on commit 3d4771e

Please sign in to comment.