File tree Expand file tree Collapse file tree 3 files changed +29
-17
lines changed Expand file tree Collapse file tree 3 files changed +29
-17
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1- import { array , string } from "prop-types" ;
21import React from "react" ;
32import styled from "styled-components" ;
43
@@ -41,8 +40,18 @@ const ItemTitle = styled.h3`
4140 font-weight: 800;
4241` ;
4342
44- function Services ( props ) {
43+ interface ServicesProps {
44+ services : {
45+ title : string ;
46+ text : string ;
47+ } [ ] ;
48+ subtitle ?: string ;
49+ title ?: string ;
50+ }
51+
52+ function Services ( props : ServicesProps ) {
4553 const { services, title, subtitle } = props ;
54+
4655 return (
4756 < Element as = "section" >
4857 < div className = "el" >
@@ -65,10 +74,4 @@ function Services(props) {
6574 ) ;
6675}
6776
68- Services . propTypes = {
69- services : array . isRequired ,
70- subtitle : string . isRequired ,
71- title : string . isRequired
72- } ;
73-
7477export default Services ;
Original file line number Diff line number Diff line change 1- import { array , string } from "prop-types" ;
21import React from "react" ;
32import styled from "styled-components" ;
43
@@ -25,7 +24,12 @@ const Items = styled.ul`
2524 }
2625 }
2726` ;
28- const Item = styled . li `
27+
28+ interface ItemProp {
29+ readonly $span : boolean
30+ }
31+
32+ const Item = styled . li < ItemProp > `
2933 height: 100%;
3034 .quote {
3135 ${ setSpace ( "mbs" ) } ;
@@ -67,8 +71,19 @@ const Item = styled.li`
6771 : `` } ;
6872` ;
6973
70- function Testimonials ( props ) {
74+ interface TestimonialsProps {
75+ testimonials : {
76+ source : string ;
77+ text : string ;
78+ span : boolean ;
79+ } [ ] ;
80+ subtitle ?: string ;
81+ title ?: string ;
82+ }
83+
84+ function Testimonials ( props : TestimonialsProps ) {
7185 const { testimonials, title, subtitle } = props ;
86+
7287 return (
7388 < Element as = "section" >
7489 < div className = "el" >
@@ -93,10 +108,4 @@ function Testimonials(props) {
93108 ) ;
94109}
95110
96- Testimonials . propTypes = {
97- testimonials : array . isRequired ,
98- subtitle : string . isRequired ,
99- title : string . isRequired
100- } ;
101-
102111export default Testimonials ;
You can’t perform that action at this time.
0 commit comments