2021-08-05 23:27:13 +00:00
//
// C o p y r i g h t 2 0 2 1 N e w V e c t o r L t d
//
// L i c e n s e d u n d e r t h e A p a c h e L i c e n s e , V e r s i o n 2 . 0 ( t h e " L i c e n s e " ) ;
// y o u m a y n o t u s e t h i s f i l e e x c e p t i n c o m p l i a n c e w i t h t h e L i c e n s e .
// Y o u m a y o b t a i n a c o p y o f t h e L i c e n s e a t
//
// h t t p : / / w w w . a p a c h e . o r g / l i c e n s e s / L I C E N S E - 2 . 0
//
// U n l e s s r e q u i r e d b y a p p l i c a b l e l a w o r a g r e e d t o i n w r i t i n g , s o f t w a r e
// d i s t r i b u t e d u n d e r t h e L i c e n s e i s d i s t r i b u t e d o n a n " A S I S " B A S I S ,
// W I T H O U T W A R R A N T I E S O R C O N D I T I O N S O F A N Y K I N D , e i t h e r e x p r e s s o r i m p l i e d .
// S e e t h e L i c e n s e f o r t h e s p e c i f i c l a n g u a g e g o v e r n i n g p e r m i s s i o n s a n d
// l i m i t a t i o n s u n d e r t h e L i c e n s e .
//
import SwiftUI
2021-08-12 10:52:06 +00:00
@ available ( iOS 14.0 , * )
struct FormSectionFooterView : View {
2021-08-05 23:27:13 +00:00
@ Environment ( \ . theme ) var theme : Theme
var text : String
var body : some View {
Text ( text )
. foregroundColor ( Color ( theme . textSecondaryColor ) )
. padding ( . top )
2021-08-12 10:52:06 +00:00
. padding ( . leading )
. padding ( . trailing )
2021-08-05 23:27:13 +00:00
. font ( Font ( theme . fonts . callout ) )
}
}
2021-08-12 10:52:06 +00:00
@ available ( iOS 14.0 , * )
2021-08-05 23:27:13 +00:00
struct FormSectionFooter_Previews : PreviewProvider {
static var previews : some View {
2021-08-12 10:52:06 +00:00
VectorFormView {
SwiftUI . Section ( footer : FormSectionFooterView ( text : " Please note that mentions & keyword notifications are not available in encrypted rooms on mobile. " ) ) {
FormPickerItemView ( title : " Item 1 " , selected : false )
FormPickerItemView ( title : " Item 2 " , selected : false )
FormPickerItemView ( title : " Item 3 " , selected : false )
2021-08-05 23:27:13 +00:00
}
2021-08-12 10:52:06 +00:00
}
2021-08-05 23:27:13 +00:00
}
}